(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_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_http, kotlin_com_github_UstadMobile_door_door_runtime, kotlin_io_github_aakira_napier, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, 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 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 Napier_getInstance = kotlin_io_github_aakira_napier.$_$.g;
  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 LongSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v;
  var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u;
  var Long = kotlin_kotlin.$_$.ai;
  var interfaceMeta = kotlin_kotlin.$_$.xb;
  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.$_$.z1;
  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.$_$.m2;
  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 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 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 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.$_$.a2;
  var CoroutineScope_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.y1;
  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 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 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.$_$.k2;
  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.$_$.n1;
  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.$_$.k1;
  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.$_$.p1;
  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.$_$.f2;
  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.$_$.m1;
  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.$_$.s1;
  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 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 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.$_$.u1;
  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.$_$.g2;
  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($invokeCOROUTINE$2, '$invokeCOROUTINE$2', classMeta, CoroutineImpl);
  setMetadataFor(SendConsentRequestToParentUseCase, 'SendConsentRequestToParentUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ConsentRequestToParentUseCaseSendToServerImpl, 'ConsentRequestToParentUseCaseSendToServerImpl', classMeta, VOID, [SendConsentRequestToParentUseCase], VOID, VOID, VOID, [1]);
  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(Companion_2, 'Companion', objectMeta);
  setMetadataFor($serializer_1, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SendConsentRequestToParentRequest, 'SendConsentRequestToParentRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_13});
  setMetadataFor(UnauthorizedException, 'UnauthorizedException', classMeta, IllegalStateException, VOID, UnauthorizedException);
  setMetadataFor(Companion_3, 'Companion', objectMeta);
  setMetadataFor($serializer_2, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(UserSessionWithPersonAndLearningSpace, 'UserSessionWithPersonAndLearningSpace', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_14});
  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_4, '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$3, '$activeSessionsListCOROUTINE$3', classMeta, CoroutineImpl);
  setMetadataFor($activeSessionCountCOROUTINE$4, '$activeSessionCountCOROUTINE$4', classMeta, CoroutineImpl);
  setMetadataFor($addSessionCOROUTINE$5, '$addSessionCOROUTINE$5', classMeta, CoroutineImpl);
  setMetadataFor($endSessionCOROUTINE$7, '$endSessionCOROUTINE$7', classMeta, CoroutineImpl);
  setMetadataFor($getSiteFromDbOrLoadFromHttpCOROUTINE$8, '$getSiteFromDbOrLoadFromHttpCOROUTINE$8', classMeta, CoroutineImpl);
  setMetadataFor($startGuestSessionCOROUTINE$10, '$startGuestSessionCOROUTINE$10', classMeta, CoroutineImpl);
  setMetadataFor(UstadAccountManager, 'UstadAccountManager', classMeta, VOID, VOID, VOID, VOID, VOID, [1, 2, 5, 4, 3, 0]);
  setMetadataFor(Companion_5, 'Companion', objectMeta);
  setMetadataFor(Companion_6, 'Companion', objectMeta);
  setMetadataFor(Anchor, 'Anchor', classMeta, VOID, VOID, Anchor, VOID, {0: AnchorSerializer_getInstance});
  setMetadataFor(AnchorSerializer, 'AnchorSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_7, 'Companion', objectMeta);
  setMetadataFor(Body, 'Body', classMeta, VOID, VOID, VOID, VOID, {0: BodySerializer_getInstance});
  setMetadataFor(BodySerializer, 'BodySerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_8, 'Companion', objectMeta);
  setMetadataFor($serializer_3, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ListItem, 'ListItem', classMeta, VOID, VOID, ListItem, VOID, {0: $serializer_getInstance_15});
  setMetadataFor(Companion_9, 'Companion', objectMeta);
  setMetadataFor($serializer_4, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavElement, 'NavElement', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_16});
  setMetadataFor(Companion_10, 'Companion', objectMeta);
  setMetadataFor($serializer_5, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavigationDocument, 'NavigationDocument', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_17});
  setMetadataFor(Companion_11, 'Companion', objectMeta);
  setMetadataFor($serializer_6, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(OrderedList, 'OrderedList', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_18});
  setMetadataFor(Companion_12, 'Companion', objectMeta);
  setMetadataFor(Span, 'Span', classMeta, VOID, VOID, Span, VOID, {0: SpanSerializer_getInstance});
  setMetadataFor(SpanSerializer, 'SpanSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor($serializer_7, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Content, 'Content', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_19});
  setMetadataFor(Companion_13, 'Companion', objectMeta);
  setMetadataFor($serializer_8, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DocTitle, 'DocTitle', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_20});
  setMetadataFor(Companion_14, 'Companion', objectMeta);
  setMetadataFor($serializer_9, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Head, 'Head', classMeta, VOID, VOID, Head, VOID, {0: $serializer_getInstance_21});
  setMetadataFor($serializer_10, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavLabel, 'NavLabel', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_22});
  setMetadataFor(Companion_15, 'Companion', objectMeta);
  setMetadataFor($serializer_11, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavMap, 'NavMap', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_23});
  setMetadataFor(Companion_16, 'Companion', objectMeta);
  setMetadataFor($serializer_12, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavPoint, 'NavPoint', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_24});
  setMetadataFor(Companion_17, 'Companion', objectMeta);
  setMetadataFor($serializer_13, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NcxDocument, 'NcxDocument', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_25});
  setMetadataFor(Companion_18, 'Companion', objectMeta);
  setMetadataFor($serializer_14, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Text, 'Text', classMeta, VOID, VOID, Text, VOID, {0: $serializer_getInstance_26});
  setMetadataFor(Companion_19, 'Companion', objectMeta);
  setMetadataFor($serializer_15, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcCreator, 'DcCreator', classMeta, VOID, VOID, DcCreator, VOID, {0: $serializer_getInstance_27});
  setMetadataFor(Companion_20, 'Companion', objectMeta);
  setMetadataFor($serializer_16, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcDescription, 'DcDescription', classMeta, VOID, VOID, DcDescription, VOID, {0: $serializer_getInstance_28});
  setMetadataFor(Companion_21, 'Companion', objectMeta);
  setMetadataFor($serializer_17, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcIdentifier, 'DcIdentifier', classMeta, VOID, VOID, DcIdentifier, VOID, {0: $serializer_getInstance_29});
  setMetadataFor($serializer_18, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcLanguage, 'DcLanguage', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_30});
  setMetadataFor(Companion_22, 'Companion', objectMeta);
  setMetadataFor($serializer_19, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcTitle, 'DcTitle', classMeta, VOID, VOID, DcTitle, VOID, {0: $serializer_getInstance_31});
  setMetadataFor($serializer_20, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Item, 'Item', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_32});
  setMetadataFor(Companion_23, 'Companion', objectMeta);
  setMetadataFor($serializer_21, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ItemRef, 'ItemRef', classMeta, VOID, VOID, ItemRef, VOID, {0: $serializer_getInstance_33});
  setMetadataFor(Companion_24, 'Companion', objectMeta);
  setMetadataFor($serializer_22, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Manifest, 'Manifest', classMeta, VOID, VOID, Manifest, VOID, {0: $serializer_getInstance_34});
  setMetadataFor(Companion_25, 'Companion', objectMeta);
  setMetadataFor($serializer_23, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Meta, 'Meta', classMeta, VOID, VOID, Meta, VOID, {0: $serializer_getInstance_35});
  setMetadataFor(Companion_26, 'Companion', objectMeta);
  setMetadataFor($serializer_24, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Metadata, 'Metadata', classMeta, VOID, VOID, Metadata, VOID, {0: $serializer_getInstance_36});
  setMetadataFor(Companion_27, 'Companion', objectMeta);
  setMetadataFor($serializer_25, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PackageDocument, 'PackageDocument', classMeta, VOID, VOID, PackageDocument, VOID, {0: $serializer_getInstance_37});
  setMetadataFor(Companion_28, 'Companion', objectMeta);
  setMetadataFor($serializer_26, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Spine, 'Spine', classMeta, VOID, VOID, Spine, VOID, {0: $serializer_getInstance_38});
  setMetadataFor(Companion_29, 'Companion', objectMeta);
  setMetadataFor($serializer_27, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentManifest, 'ContentManifest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_39});
  setMetadataFor(Companion_30, 'Companion', objectMeta);
  setMetadataFor($serializer_28, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentManifestEntry, 'ContentManifestEntry', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_40});
  setMetadataFor(Companion_31, 'Companion', objectMeta);
  setMetadataFor($serializer_29, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MediaContentInfo, 'MediaContentInfo', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_41});
  setMetadataFor($serializer_30, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MediaSource, 'MediaSource', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_42});
  setMetadataFor(Companion_32, 'Companion', objectMeta);
  setMetadataFor($serializer_31, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SubtitleTrack, 'SubtitleTrack', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_43});
  setMetadataFor(InvalidContentException, 'InvalidContentException', classMeta, IllegalArgumentException);
  setMetadataFor(Companion_33, 'Companion', objectMeta);
  setMetadataFor($serializer_32, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MetadataResult, 'MetadataResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_44});
  setMetadataFor(PersonConstants, 'PersonConstants', objectMeta);
  setMetadataFor(SubmissionConstants, 'SubmissionConstants', objectMeta);
  setMetadataFor(TerminologyKeys, 'TerminologyKeys', objectMeta);
  setMetadataFor($invokeCOROUTINE$11, '$invokeCOROUTINE$11', 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$12, '$invokeCOROUTINE$12', 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$13, '$invokeCOROUTINE$13', 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$15, '$collectCOROUTINE$15', 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$14, '$invokeCOROUTINE$14', 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(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_34, 'Companion', objectMeta);
  setMetadataFor($serializer_33, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SaveLocalUriAsBlobItem, 'SaveLocalUriAsBlobItem', classMeta);
  setMetadataFor(SavedBlob, 'SavedBlob', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_45});
  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.fou(localUrisToSave, onTransferJobItemCreated, $completion) : $super.fou.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_35, '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_36, '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.yoz(items, batchUuid, chunkSize, tableId, entityUid, $completion) : $super.yoz.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.op0(url, progressInterval, onStateChange, inflateToTmpFileIfCompressed, $completion) : $super.op0.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_37, 'Companion', objectMeta);
  setMetadataFor($serializer_34, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CompressParams, 'CompressParams', classMeta, VOID, VOID, CompressParams, VOID, {0: $serializer_getInstance_46});
  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.hp4(fromUri, toUri, params, onProgress, $completion) : $super.hp4.call(this, fromUri, toUri, params, onProgress, $completion);
  }
  setMetadataFor(CompressUseCase, 'CompressUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(Companion_38, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(CompressionLevel, 'CompressionLevel', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_55});
  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_39, '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_40, 'Companion', objectMeta);
  function invoke$default_3(subtitleTrackUri, filename, locale, $completion, $super) {
    locale = locale === VOID ? null : locale;
    return $super === VOID ? this.cp6(subtitleTrackUri, filename, locale, $completion) : $super.cp6.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_41, 'Companion', objectMeta);
  setMetadataFor($serializer_35, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ImportRequest, 'ImportRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_47});
  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_42, 'Companion', objectMeta);
  setMetadataFor($serializer_36, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PasskeyVerifyResult, 'PasskeyVerifyResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_48});
  setMetadataFor(SavePersonPasskeyUseCase, 'SavePersonPasskeyUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(DecodeUserHandleUseCase, 'DecodeUserHandleUseCase', interfaceMeta);
  setMetadataFor(Companion_43, 'Companion', objectMeta);
  setMetadataFor($serializer_37, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticationExtensionsClientOutputsJSON, 'AuthenticationExtensionsClientOutputsJSON', classMeta, VOID, VOID, AuthenticationExtensionsClientOutputsJSON, VOID, {0: $serializer_getInstance_49});
  setMetadataFor(Companion_44, 'Companion', objectMeta);
  setMetadataFor($serializer_38, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticationExtensionsPRFOutputsJSON, 'AuthenticationExtensionsPRFOutputsJSON', classMeta, VOID, VOID, AuthenticationExtensionsPRFOutputsJSON, VOID, {0: $serializer_getInstance_50});
  setMetadataFor(Companion_45, 'Companion', objectMeta);
  setMetadataFor($serializer_39, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticationResponseJSON, 'AuthenticationResponseJSON', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_51});
  setMetadataFor($serializer_40, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticatorAssertionResponseJSON, 'AuthenticatorAssertionResponseJSON', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_52});
  setMetadataFor(Companion_46, 'Companion', objectMeta);
  setMetadataFor($serializer_41, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClientDataJSON, 'ClientDataJSON', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_53});
  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_47, '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_48, '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_49, 'Companion', objectMeta);
  setMetadataFor($serializer_42, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SendClazzInvitesRequest, 'SendClazzInvitesRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_54});
  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.rpk(uiLang, currentDestination, navController, navArgs) : $super.rpk.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(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_43, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddPersonsDataError, 'BulkAddPersonsDataError', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_55});
  setMetadataFor(BulkAddPersonsFromLocalUriUseCase, 'BulkAddPersonsFromLocalUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(Companion_51, 'Companion', objectMeta);
  setMetadataFor($serializer_44, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddUsersResult, 'BulkAddUsersResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_56});
  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(GetOfflineStorageAvailableSpace, 'GetOfflineStorageAvailableSpace', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_55, 'Companion', objectMeta);
  setMetadataFor(GetOfflineStorageOptionsUseCase, 'GetOfflineStorageOptionsUseCase', interfaceMeta);
  setMetadataFor(GetOfflineStorageSettingUseCase, 'GetOfflineStorageSettingUseCase', classMeta);
  setMetadataFor(OfflineStorageOption, 'OfflineStorageOption', classMeta);
  setMetadataFor(SetOfflineStorageSettingUseCase, 'SetOfflineStorageSettingUseCase', 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.ypp(uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion) : $super.ypp.call(this, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion);
  }
  setMetadataFor(ChunkedUploadClientLocalUriUseCase, 'ChunkedUploadClientLocalUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [8]);
  setMetadataFor(Companion_56, '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_57, 'Companion', objectMeta);
  setMetadataFor(ValidateUsernameUseCase, 'ValidateUsernameUseCase', classMeta, VOID, VOID, ValidateUsernameUseCase);
  setMetadataFor(Companion_58, '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_59, 'Companion', objectMeta);
  setMetadataFor(FormatStatementResponseUseCase$invoke$slambda, 'FormatStatementResponseUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(FormatStatementResponseUseCase, 'FormatStatementResponseUseCase', classMeta);
  setMetadataFor(Companion_60, 'Companion', objectMeta);
  setMetadataFor($serializer_45, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Attachment, 'Attachment', classMeta, VOID, VOID, Attachment, VOID, {0: $serializer_getInstance_57});
  setMetadataFor(Companion_61, 'Companion', objectMeta);
  setMetadataFor($serializer_46, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiAccount, 'XapiAccount', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_58});
  setMetadataFor(Companion_62, 'Companion', objectMeta);
  setMetadataFor($serializer_47, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Interaction, 'Interaction', classMeta, VOID, VOID, Interaction, VOID, {0: $serializer_getInstance_59});
  setMetadataFor(Companion_63, 'Companion', objectMeta);
  setMetadataFor($serializer_48, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiActivity, 'XapiActivity', classMeta, VOID, VOID, XapiActivity, VOID, {0: $serializer_getInstance_60});
  setMetadataFor(ActivityEntities, 'ActivityEntities', classMeta);
  setMetadataFor(Companion_64, '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_65, 'Companion', objectMeta);
  setMetadataFor($serializer_49, '$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_61});
  setMetadataFor(Companion_66, 'Companion', objectMeta);
  setMetadataFor($serializer_50, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiContext, 'XapiContext', classMeta, VOID, VOID, XapiContext, VOID, {0: $serializer_getInstance_62});
  setMetadataFor(Companion_67, 'Companion', objectMeta);
  setMetadataFor(XapiContextActivities, 'XapiContextActivities', classMeta, VOID, VOID, XapiContextActivities, VOID, {0: XapiContextActivitiesSerializer_getInstance});
  setMetadataFor(XapiContextActivitiesSerializer, 'XapiContextActivitiesSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_68, 'Companion', objectMeta);
  setMetadataFor($serializer_51, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiContextActivitiesSurrogate, 'XapiContextActivitiesSurrogate', classMeta, VOID, VOID, XapiContextActivitiesSurrogate, VOID, {0: $serializer_getInstance_63});
  setMetadataFor(Companion_69, 'Companion', objectMeta);
  setMetadataFor($serializer_52, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiGroup, 'XapiGroup', classMeta, VOID, [XapiActor, XapiStatementObject], XapiGroup, VOID, {0: $serializer_getInstance_64});
  setMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(Companion_70, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiInteractionType, 'XapiInteractionType', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_87});
  setMetadataFor(XapiInteractionTypeSerializer, 'XapiInteractionTypeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_71, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiObjectType, 'XapiObjectType', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_88});
  setMetadataFor(XapiObjectTypeSerializer, 'XapiObjectTypeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_72, 'Companion', objectMeta);
  setMetadataFor($serializer_53, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Score, 'Score', classMeta, VOID, VOID, Score, VOID, {0: $serializer_getInstance_65});
  setMetadataFor(Companion_73, 'Companion', objectMeta);
  setMetadataFor($serializer_54, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiResult, 'XapiResult', classMeta, VOID, VOID, XapiResult, VOID, {0: $serializer_getInstance_66});
  setMetadataFor(Companion_74, 'Companion', objectMeta);
  setMetadataFor($serializer_55, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatement, 'XapiStatement', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_67});
  setMetadataFor(StatementEntities, 'StatementEntities', classMeta, VOID, VOID, StatementEntities);
  setMetadataFor(XapiStatementObjectSerializer, 'XapiStatementObjectSerializer', objectMeta, JsonContentPolymorphicSerializer);
  setMetadataFor(Companion_75, 'Companion', objectMeta);
  setMetadataFor($serializer_56, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiActivityStatementObject, 'XapiActivityStatementObject', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_68});
  setMetadataFor(Companion_76, 'Companion', objectMeta);
  setMetadataFor($serializer_57, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementRef, 'XapiStatementRef', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_69});
  setMetadataFor(Companion_77, 'Companion', objectMeta);
  setMetadataFor($serializer_58, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiVerb, 'XapiVerb', classMeta, VOID, VOID, XapiVerb, VOID, {0: $serializer_getInstance_70});
  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_78, 'Companion', objectMeta);
  setMetadataFor($serializer_59, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementsAndSession, 'XapiStatementsAndSession', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_71});
  setMetadataFor(ResumeOrStartXapiSessionUseCase, 'ResumeOrStartXapiSessionUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(UstadMobileConstants, 'UstadMobileConstants', objectMeta);
  setMetadataFor(Companion_79, 'Companion', objectMeta);
  setMetadataFor(UstadGoOptions, 'UstadGoOptions', classMeta, VOID, VOID, UstadGoOptions);
  setMetadataFor(UiLanguage, 'UiLanguage', classMeta);
  setMetadataFor(Companion_80, '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_81, '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_82, 'Companion', objectMeta);
  setMetadataFor(GenderConfig, 'GenderConfig', classMeta, VOID, VOID, GenderConfig);
  setMetadataFor(SettingsLocaleSettingDelegate, 'SettingsLocaleSettingDelegate', classMeta);
  setMetadataFor(Companion_83, 'Companion', objectMeta);
  setMetadataFor(SupportedLanguagesConfig, 'SupportedLanguagesConfig', classMeta);
  setMetadataFor(Companion_84, 'Companion', objectMeta);
  setMetadataFor(SystemUrlConfig, 'SystemUrlConfig', classMeta);
  setMetadataFor(Companion_85, 'Companion', objectMeta);
  setMetadataFor(Companion_86, '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_96().lq6_1 : goOptions;
    var tmp;
    if ($super === VOID) {
      this.uqb(viewName, args, goOptions);
      tmp = Unit_instance;
    } else {
      tmp = $super.uqb.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_87, 'Companion', objectMeta);
  setMetadataFor(TinCanXML, 'TinCanXML', classMeta, VOID, VOID, TinCanXML);
  setMetadataFor(Companion_88, '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_89, 'Companion', objectMeta);
  setMetadataFor(MessageIdOption2, 'MessageIdOption2', classMeta);
  setMetadataFor(SortOrderOption, 'SortOrderOption', classMeta);
  setMetadataFor(UMFileUtil, 'UMFileUtil', objectMeta);
  setMetadataFor(Companion_90, '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_91, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(IStringValues, 'IStringValues', interfaceMeta, VOID, VOID, VOID, VOID, {0: Companion_getInstance_108});
  setMetadataFor(MapStringValues, 'MapStringValues', classMeta, VOID, [IStringValues]);
  setMetadataFor(StringValuesSerializer, 'StringValuesSerializer', classMeta, VOID, [KSerializer], StringValuesSerializer);
  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(Companion_99, 'Companion', objectMeta);
  setMetadataFor(ListViewMode, 'ListViewMode', classMeta, Enum);
  setMetadataFor(Companion_100, '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_101, 'Companion', objectMeta);
  setMetadataFor(HolidayCalendarEditUiState, 'HolidayCalendarEditUiState', classMeta, VOID, VOID, HolidayCalendarEditUiState);
  setMetadataFor(Companion_102, '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_103, '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_104, '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_105, 'Companion', objectMeta);
  setMetadataFor(ReportFilterEditUiState, 'ReportFilterEditUiState', classMeta, VOID, VOID, ReportFilterEditUiState);
  setMetadataFor(ScopedGrantDetailUiState, 'ScopedGrantDetailUiState', classMeta, VOID, VOID, ScopedGrantDetailUiState);
  setMetadataFor(Companion_106, 'Companion', objectMeta);
  setMetadataFor(ScopedGrantEditUiState, 'ScopedGrantEditUiState', classMeta, VOID, VOID, ScopedGrantEditUiState);
  setMetadataFor(Companion_107, 'Companion', objectMeta);
  setMetadataFor(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda, 'UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_108, '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_109, '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_110, 'Companion', objectMeta);
  setMetadataFor(OpenLicensesViewModel, 'OpenLicensesViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_111, '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_112, '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_113, '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$onClickAccount$slambda, 'AccountListViewModel$onClickAccount$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$navigateToConsentManagementScreen$slambda, 'AccountListViewModel$navigateToConsentManagementScreen$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($getChildDetailCOROUTINE$61, '$getChildDetailCOROUTINE$61', classMeta, CoroutineImpl);
  setMetadataFor(AccountListViewModel, 'AccountListViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [0, 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$62, '$getTitleForCoursePermissionCOROUTINE$62', 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_114, '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$63, '$collectCOROUTINE$63', 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$64, '$collectCOROUTINE$64', 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$65, '$collectCOROUTINE$65', 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_115, '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_116, 'Companion', objectMeta);
  setMetadataFor($serializer_60, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CopyCourseResult, 'CopyCourseResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_72});
  setMetadataFor($invokeCOROUTINE$66, '$invokeCOROUTINE$66', 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_117, '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$67, '$updateCourseBlockListCOROUTINE$67', classMeta, CoroutineImpl);
  setMetadataFor(ClazzEditViewModel, 'ClazzEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(CourseBlockUiState, 'CourseBlockUiState', classMeta);
  setMetadataFor(Companion_118, 'Companion', objectMeta);
  setMetadataFor($serializer_61, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClazzEditUiState, 'ClazzEditUiState', classMeta, VOID, VOID, ClazzEditUiState, VOID, {0: $serializer_getInstance_73});
  setMetadataFor($loadCOROUTINE$68, '$loadCOROUTINE$68', classMeta, CoroutineImpl);
  setMetadataFor($loadHttpCOROUTINE$69, '$loadHttpCOROUTINE$69', 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_119, '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_120, '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_121, 'Companion', objectMeta);
  setMetadataFor(ClazzInviteViaContactViewModel$onClickSend$slambda, 'ClazzInviteViaContactViewModel$onClickSend$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($sendContactsToServerCOROUTINE$70, '$sendContactsToServerCOROUTINE$70', 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_122, 'Companion', objectMeta);
  setMetadataFor(ClazzInviteViaLinkViewModel, 'ClazzInviteViaLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzInviteViaLinkUiState, 'ClazzInviteViaLinkUiState', classMeta, VOID, VOID, ClazzInviteViaLinkUiState);
  setMetadataFor(Companion_123, '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_124, '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_125, '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_126, '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_127, '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_128, '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_129, '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_130, '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_131, '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_132, '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$71, '$collectCOROUTINE$71', 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_133, '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_134, '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_135, 'Companion', objectMeta);
  setMetadataFor($serializer_62, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClazzAssignmentEditUiState, 'ClazzAssignmentEditUiState', classMeta, VOID, VOID, ClazzAssignmentEditUiState, VOID, {0: $serializer_getInstance_74});
  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_136, '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_137, '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_138, '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_139, '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$72, '$collectCOROUTINE$72', 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$73, '$collectCOROUTINE$73', 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_140, '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_141, '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_142, '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_143, '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$74, '$savePersonAndAttendanceRecordsCOROUTINE$74', classMeta, CoroutineImpl);
  setMetadataFor($commitAttendanceRecordsToStateCOROUTINE$75, '$commitAttendanceRecordsToStateCOROUTINE$75', classMeta, CoroutineImpl);
  setMetadataFor(ClazzLogEditAttendanceViewModel, 'ClazzLogEditAttendanceViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 0, 3, 6]);
  setMetadataFor(ClazzLogEditAttendanceUiState, 'ClazzLogEditAttendanceUiState', classMeta, VOID, VOID, ClazzLogEditAttendanceUiState);
  setMetadataFor(Companion_144, '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_145, '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$76, '$buildSortOptionsCOROUTINE$76', 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_146, '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_147, '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_148, '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_149, '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_150, '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_151, '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_152, '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_153, '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_154, 'Companion', objectMeta);
  setMetadataFor(ContentEntryListUiState, 'ContentEntryListUiState', classMeta, VOID, VOID, ContentEntryListUiState);
  setMetadataFor(Companion_155, 'Companion', objectMeta);
  setMetadataFor($serializer_63, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentEntryListSelectedItem, 'ContentEntryListSelectedItem', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_75});
  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_156, '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_157, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(CompletionCriteria, 'CompletionCriteria', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_174});
  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_158, '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_159, 'Companion', objectMeta);
  setMetadataFor($serializer_64, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CourseBlockEditUiState, 'CourseBlockEditUiState', classMeta, VOID, VOID, CourseBlockEditUiState, VOID, {0: $serializer_getInstance_76});
  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_160, '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_161, '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_162, '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_163, '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_164, '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_165, '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_166, '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_167, '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_168, '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_169, '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$77, '$submitReplyCOROUTINE$77', 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_170, '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_171, '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_172, 'Companion', objectMeta);
  setMetadataFor(Companion_173, '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_174, '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_175, '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(Companion_176, 'Companion', objectMeta);
  setMetadataFor(ParentConsentWaitingScreenViewModel, 'ParentConsentWaitingScreenViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  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_177, '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_178, '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_179, '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_180, 'Companion', objectMeta);
  setMetadataFor($serializer_65, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PersonUsernameAndPasswordModel, 'PersonUsernameAndPasswordModel', classMeta, VOID, VOID, PersonUsernameAndPasswordModel, VOID, {0: $serializer_getInstance_77});
  setMetadataFor(Companion_181, '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_182, 'Companion', objectMeta);
  setMetadataFor($serializer_66, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddPersonRunImportUiState, 'BulkAddPersonRunImportUiState', classMeta, VOID, VOID, BulkAddPersonRunImportUiState, VOID, {0: $serializer_getInstance_78});
  setMetadataFor(Companion_183, '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(ChildProfileListViewModel$lambda$slambda$slambda$slambda, 'ChildProfileListViewModel$lambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ChildProfileListViewModel$lambda$slambda$slambda$slambda_1, 'ChildProfileListViewModel$lambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ChildProfileListViewModel$lambda$slambda$slambda$slambda_3, 'ChildProfileListViewModel$lambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ChildProfileListViewModel$lambda$slambda$slambda, 'ChildProfileListViewModel$lambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_184, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_33, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ChildProfileListViewModel$lambda$slambda, 'ChildProfileListViewModel$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ChildProfileListViewModel$lambda$slambda_1, 'ChildProfileListViewModel$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ChildProfileListViewModel$updateChildProfileList$slambda, 'ChildProfileListViewModel$updateChildProfileList$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ChildProfileListViewModel$addChildIntoUiState$slambda, 'ChildProfileListViewModel$addChildIntoUiState$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ChildProfileListViewModel$onClickDeleteChildProfile$slambda, 'ChildProfileListViewModel$onClickDeleteChildProfile$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ChildProfileListViewModel$onProfileSelected$slambda, 'ChildProfileListViewModel$onProfileSelected$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ChildProfileListViewModel$updatePersonParentJoinWhenChildAddedViaLink$slambda, 'ChildProfileListViewModel$updatePersonParentJoinWhenChildAddedViaLink$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($updateChildProfileListCOROUTINE$78, '$updateChildProfileListCOROUTINE$78', classMeta, CoroutineImpl);
  setMetadataFor(ChildProfileListViewModel, 'ChildProfileListViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(ChildProfileListUiState, 'ChildProfileListUiState', classMeta, VOID, VOID, ChildProfileListUiState);
  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_185, '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$onClickSave$slambda, 'EditChildProfileViewModel$onClickSave$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_186, '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_187, '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_188, '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_189, '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_190, '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_191, 'Companion', objectMeta);
  setMetadataFor(RegisterAgeRedirectViewModel, 'RegisterAgeRedirectViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(RegisterAgeRedirectUiState, 'RegisterAgeRedirectUiState', classMeta, VOID, VOID, RegisterAgeRedirectUiState);
  setMetadataFor(Companion_192, 'Companion', objectMeta);
  setMetadataFor(RegisterMinorWaitForParentViewModel, 'RegisterMinorWaitForParentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(RegisterMinorWaitForParentUiState, 'RegisterMinorWaitForParentUiState', classMeta, VOID, VOID, RegisterMinorWaitForParentUiState);
  setMetadataFor(Companion_193, '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_194, '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_195, 'Companion', objectMeta);
  setMetadataFor(SettingsViewModel$slambda$slambda, 'SettingsViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_196, '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$slambda_1, '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(SettingsOfflineStorageOption, 'SettingsOfflineStorageOption', classMeta);
  setMetadataFor(Companion_197, '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_198, 'Companion', objectMeta);
  setMetadataFor(SignUpViewModel$slambda, 'SignUpViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$slambda_1, '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$onClickDone$slambda, 'SignUpViewModel$onClickDone$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($sendConsentAndNavigateToMinorWaitScreenCOROUTINE$81, '$sendConsentAndNavigateToMinorWaitScreenCOROUTINE$81', classMeta, CoroutineImpl);
  setMetadataFor($enrollToCourseFromInviteUidCOROUTINE$82, '$enrollToCourseFromInviteUidCOROUTINE$82', classMeta, CoroutineImpl);
  setMetadataFor(SignUpViewModel, 'SignUpViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(SignUpUiState, 'SignUpUiState', classMeta, VOID, VOID, SignUpUiState);
  setMetadataFor(Companion_199, '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$navigateToAppropriateScreen$slambda, 'SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignupEnterUsernamePasswordViewModel$navigateToConsentManagementScreen$slambda, 'SignupEnterUsernamePasswordViewModel$navigateToConsentManagementScreen$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($sendConsentAndNavigateToMinorWaitScreenCOROUTINE$83, '$sendConsentAndNavigateToMinorWaitScreenCOROUTINE$83', classMeta, CoroutineImpl);
  setMetadataFor(SignupEnterUsernamePasswordViewModel, 'SignupEnterUsernamePasswordViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 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_200, '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_201, '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_202, '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_203, '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_204, '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_205, '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_206, '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_207, '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_208, '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$84, '$encryptPbkdf2COROUTINE$84', classMeta, CoroutineImpl);
  setMetadataFor($doublePbkdf2HashAsBase64COROUTINE$86, '$doublePbkdf2HashAsBase64COROUTINE$86', 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$87, '$invokeCOROUTINE$87', 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$88, '$invokeCOROUTINE$88', 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$89, '$invokeCOROUTINE$89', classMeta, CoroutineImpl);
  setMetadataFor(CompressImageUseCaseJs, 'CompressImageUseCaseJs', classMeta, VOID, [CompressUseCase], CompressImageUseCaseJs, VOID, VOID, [4]);
  setMetadataFor(Companion_209, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$90, '$invokeCOROUTINE$90', classMeta, CoroutineImpl);
  setMetadataFor(ContentEntryGetMetaDataFromUriUseCaseJs, 'ContentEntryGetMetaDataFromUriUseCaseJs', classMeta, VOID, [ContentEntryGetMetaDataFromUriUseCase], VOID, VOID, VOID, [4]);
  setMetadataFor($invokeCOROUTINE$91, '$invokeCOROUTINE$91', classMeta, CoroutineImpl);
  setMetadataFor(GetSubtitleTrackFromUriUseCaseJs, 'GetSubtitleTrackFromUriUseCaseJs', classMeta, VOID, [GetSubtitleTrackFromUriUseCase], VOID, VOID, VOID, [3]);
  setMetadataFor($invokeCOROUTINE$92, '$invokeCOROUTINE$92', 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$93, '$invokeCOROUTINE$93', 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$94, '$invokeCOROUTINE$94', 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$95, '$invokeCOROUTINE$95', 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_210, 'Companion', objectMeta);
  setMetadataFor(UstadMobileSystemImpl, 'UstadMobileSystemImpl', classMeta, UstadMobileSystemCommon, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(StringProviderJs, 'StringProviderJs', classMeta);
  setMetadataFor(Companion_211, 'Companion', objectMeta);
  setMetadataFor(SavedStateHandle2, 'SavedStateHandle2', classMeta);
  setMetadataFor(UrlKmpJs, 'UrlKmpJs', classMeta);
  setMetadataFor(Companion_212, '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.kmj_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.lmj_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.mmj_1 = new Impl(this.lmj_1, this.kmj_1);
    this.nmj_1 = new StringResource('app_name', this.mmj_1);
    this.omj_1 = new StringResource('blank', this.mmj_1);
    this.pmj_1 = new StringResource('login', this.mmj_1);
    this.qmj_1 = new StringResource('got_it', this.mmj_1);
    this.rmj_1 = new StringResource('learn_more', this.mmj_1);
    this.smj_1 = new StringResource('be_careful_interacting_online', this.mmj_1);
    this.tmj_1 = new StringResource('be_careful_not_to_share', this.mmj_1);
    this.umj_1 = new StringResource('share_app', this.mmj_1);
    this.vmj_1 = new StringResource('send_apk_file', this.mmj_1);
    this.wmj_1 = new StringResource('send_app_link', this.mmj_1);
    this.xmj_1 = new StringResource('error', this.mmj_1);
    this.ymj_1 = new StringResource('create_backup', this.mmj_1);
    this.zmj_1 = new StringResource('create_backup_description', this.mmj_1);
    this.amk_1 = new StringResource('err_registering_new_user', this.mmj_1);
    this.bmk_1 = new StringResource('register_empty_fields', this.mmj_1);
    this.cmk_1 = new StringResource('register_incorrect_email', this.mmj_1);
    this.dmk_1 = new StringResource('group_activity', this.mmj_1);
    this.emk_1 = new StringResource('select_group_members', this.mmj_1);
    this.fmk_1 = new StringResource('confirm_delete_message', this.mmj_1);
    this.gmk_1 = new StringResource('wrong_user_pass_combo', this.mmj_1);
    this.hmk_1 = new StringResource('login_network_error', this.mmj_1);
    this.imk_1 = new StringResource('download', this.mmj_1);
    this.jmk_1 = new StringResource('downloaded', this.mmj_1);
    this.kmk_1 = new StringResource('recycled', this.mmj_1);
    this.lmk_1 = new StringResource('libraries', this.mmj_1);
    this.mmk_1 = new StringResource('pause_download', this.mmj_1);
    this.nmk_1 = new StringResource('ok', this.mmj_1);
    this.omk_1 = new StringResource('confirm', this.mmj_1);
    this.pmk_1 = new StringResource('cancel', this.mmj_1);
    this.qmk_1 = new StringResource('canceled', this.mmj_1);
    this.rmk_1 = new StringResource('delete', this.mmj_1);
    this.smk_1 = new StringResource('deleted', this.mmj_1);
    this.tmk_1 = new StringResource('new_tab', this.mmj_1);
    this.umk_1 = new StringResource('loading', this.mmj_1);
    this.vmk_1 = new StringResource('deleting', this.mmj_1);
    this.wmk_1 = new StringResource('processing', this.mmj_1);
    this.xmk_1 = new StringResource('uploading', this.mmj_1);
    this.ymk_1 = new StringResource('error_opening_file', this.mmj_1);
    this.zmk_1 = new StringResource('logout', this.mmj_1);
    this.aml_1 = new StringResource('about', this.mmj_1);
    this.bml_1 = new StringResource('download_all', this.mmj_1);
    this.cml_1 = new StringResource('next', this.mmj_1);
    this.dml_1 = new StringResource('previous', this.mmj_1);
    this.eml_1 = new StringResource('back', this.mmj_1);
    this.fml_1 = new StringResource('username', this.mmj_1);
    this.gml_1 = new StringResource('password', this.mmj_1);
    this.hml_1 = new StringResource('confirm_password', this.mmj_1);
    this.iml_1 = new StringResource('last_name', this.mmj_1);
    this.jml_1 = new StringResource('first_name', this.mmj_1);
    this.kml_1 = new StringResource('least_recent', this.mmj_1);
    this.lml_1 = new StringResource('by_score', this.mmj_1);
    this.mml_1 = new StringResource('by_completion', this.mmj_1);
    this.nml_1 = new StringResource('by_recent_attempt', this.mmj_1);
    this.oml_1 = new StringResource('by_timestamp', this.mmj_1);
    this.pml_1 = new StringResource('register_now', this.mmj_1);
    this.qml_1 = new StringResource('new_password', this.mmj_1);
    this.rml_1 = new StringResource('phone_memory', this.mmj_1);
    this.sml_1 = new StringResource('memory_card', this.mmj_1);
    this.tml_1 = new StringResource('device', this.mmj_1);
    this.uml_1 = new StringResource('register', this.mmj_1);
    this.vml_1 = new StringResource('phone_number', this.mmj_1);
    this.wml_1 = new StringResource('name_key', this.mmj_1);
    this.xml_1 = new StringResource('description', this.mmj_1);
    this.yml_1 = new StringResource('male', this.mmj_1);
    this.zml_1 = new StringResource('female', this.mmj_1);
    this.amm_1 = new StringResource('other', this.mmj_1);
    this.bmm_1 = new StringResource('unset', this.mmj_1);
    this.cmm_1 = new StringResource('settings', this.mmj_1);
    this.dmm_1 = new StringResource('language', this.mmj_1);
    this.emm_1 = new StringResource('add_a_new_language', this.mmj_1);
    this.fmm_1 = new StringResource('add_new_language', this.mmj_1);
    this.gmm_1 = new StringResource('select_language', this.mmj_1);
    this.hmm_1 = new StringResource('languages', this.mmj_1);
    this.imm_1 = new StringResource('edit_language', this.mmj_1);
    this.jmm_1 = new StringResource('two_letter_code', this.mmj_1);
    this.kmm_1 = new StringResource('three_letter_code', this.mmj_1);
    this.lmm_1 = new StringResource('languages_description', this.mmj_1);
    this.mmm_1 = new StringResource('advanced', this.mmj_1);
    this.nmm_1 = new StringResource('optional', this.mmj_1);
    this.omm_1 = new StringResource('email', this.mmj_1);
    this.pmm_1 = new StringResource('regcode', this.mmj_1);
    this.qmm_1 = new StringResource('home', this.mmj_1);
    this.rmm_1 = new StringResource('phone', this.mmj_1);
    this.smm_1 = new StringResource('attendance', this.mmj_1);
    this.tmm_1 = new StringResource('classes', this.mmj_1);
    this.umm_1 = new StringResource('exams', this.mmj_1);
    this.vmm_1 = new StringResource('reports', this.mmj_1);
    this.wmm_1 = new StringResource('choose_template', this.mmj_1);
    this.xmm_1 = new StringResource('save_as_template', this.mmj_1);
    this.ymm_1 = new StringResource('contents', this.mmj_1);
    this.zmm_1 = new StringResource('students', this.mmj_1);
    this.amn_1 = new StringResource('add_a_student', this.mmj_1);
    this.bmn_1 = new StringResource('forgot_password', this.mmj_1);
    this.cmn_1 = new StringResource('notifications', this.mmj_1);
    this.dmn_1 = new StringResource('account', this.mmj_1);
    this.emn_1 = new StringResource('accounts', this.mmj_1);
    this.fmn_1 = new StringResource('share', this.mmj_1);
    this.gmn_1 = new StringResource('send', this.mmj_1);
    this.hmn_1 = new StringResource('open', this.mmj_1);
    this.imn_1 = new StringResource('downloading', this.mmj_1);
    this.jmn_1 = new StringResource('waiting', this.mmj_1);
    this.kmn_1 = new StringResource('waiting_for_connection', this.mmj_1);
    this.lmn_1 = new StringResource('queued', this.mmj_1);
    this.mmn_1 = new StringResource('failed', this.mmj_1);
    this.nmn_1 = new StringResource('passed', this.mmj_1);
    this.omn_1 = new StringResource('success', this.mmj_1);
    this.pmn_1 = new StringResource('failure', this.mmj_1);
    this.qmn_1 = new StringResource('incomplete', this.mmj_1);
    this.rmn_1 = new StringResource('completed', this.mmj_1);
    this.smn_1 = new StringResource('experience', this.mmj_1);
    this.tmn_1 = new StringResource('answered', this.mmj_1);
    this.umn_1 = new StringResource('select_subtitle_video', this.mmj_1);
    this.vmn_1 = new StringResource('no_subtitle', this.mmj_1);
    this.wmn_1 = new StringResource('no_video_file_found', this.mmj_1);
    this.xmn_1 = new StringResource('content_from_file', this.mmj_1);
    this.ymn_1 = new StringResource('content_from_link', this.mmj_1);
    this.zmn_1 = new StringResource('import_from_file', this.mmj_1);
    this.amo_1 = new StringResource('import_from_link', this.mmj_1);
    this.bmo_1 = new StringResource('import_content', this.mmj_1);
    this.cmo_1 = new StringResource('update_content', this.mmj_1);
    this.dmo_1 = new StringResource('publicly_accessible', this.mmj_1);
    this.emo_1 = new StringResource('title', this.mmj_1);
    this.fmo_1 = new StringResource('licence', this.mmj_1);
    this.gmo_1 = new StringResource('ebook', this.mmj_1);
    this.hmo_1 = new StringResource('interactive', this.mmj_1);
    this.imo_1 = new StringResource('collection', this.mmj_1);
    this.jmo_1 = new StringResource('document', this.mmj_1);
    this.kmo_1 = new StringResource('article', this.mmj_1);
    this.lmo_1 = new StringResource('audio', this.mmj_1);
    this.mmo_1 = new StringResource('move', this.mmj_1);
    this.nmo_1 = new StringResource('hide', this.mmj_1);
    this.omo_1 = new StringResource('unhide', this.mmj_1);
    this.pmo_1 = new StringResource('compress', this.mmj_1);
    this.qmo_1 = new StringResource('and_key', this.mmj_1);
    this.rmo_1 = new StringResource('added', this.mmj_1);
    this.smo_1 = new StringResource('attempts', this.mmj_1);
    this.tmo_1 = new StringResource('add_link_description', this.mmj_1);
    this.umo_1 = new StringResource('add_gallery_description', this.mmj_1);
    this.vmo_1 = new StringResource('add_file_description', this.mmj_1);
    this.wmo_1 = new StringResource('error_this_device_doesnt_support_bluetooth_sharing', this.mmj_1);
    this.xmo_1 = new StringResource('share_offline_zip_checkbox_label', this.mmj_1);
    this.ymo_1 = new StringResource('share_offline_dialog_message', this.mmj_1);
    this.zmo_1 = new StringResource('preparing', this.mmj_1);
    this.amp_1 = new StringResource('fixed_date', this.mmj_1);
    this.bmp_1 = new StringResource('relative_date', this.mmj_1);
    this.cmp_1 = new StringResource('field_required_prompt', this.mmj_1);
    this.dmp_1 = new StringResource('field_password_error_min', this.mmj_1);
    this.emp_1 = new StringResource('filed_password_no_match', this.mmj_1);
    this.fmp_1 = new StringResource('update', this.mmj_1);
    this.gmp_1 = new StringResource('profile', this.mmj_1);
    this.hmp_1 = new StringResource('dialog_download_from_playstore_message', this.mmj_1);
    this.imp_1 = new StringResource('dialog_download_from_playstore_ok', this.mmj_1);
    this.jmp_1 = new StringResource('dialog_download_from_playstore_cancel', this.mmj_1);
    this.kmp_1 = new StringResource('accept', this.mmj_1);
    this.lmp_1 = new StringResource('also_available_in', this.mmj_1);
    this.mmp_1 = new StringResource('created_partnership', this.mmj_1);
    this.nmp_1 = new StringResource('onboarding_get_started_label', this.mmj_1);
    this.omp_1 = new StringResource('lets_get_started_label', this.mmj_1);
    this.pmp_1 = new StringResource('onboarding_headline1', this.mmj_1);
    this.qmp_1 = new StringResource('onboarding_subheadline1', this.mmj_1);
    this.rmp_1 = new StringResource('onboarding_headline2', this.mmj_1);
    this.smp_1 = new StringResource('onboarding_subheadline2', this.mmj_1);
    this.tmp_1 = new StringResource('onboarding_headline3', this.mmj_1);
    this.ump_1 = new StringResource('onboarding_subheadline3', this.mmj_1);
    this.vmp_1 = new StringResource('download_continue_stacked_label', this.mmj_1);
    this.wmp_1 = new StringResource('im_an_individual_learner', this.mmj_1);
    this.xmp_1 = new StringResource('im_an_individual_learner_description', this.mmj_1);
    this.ymp_1 = new StringResource('i_want_to_join_my_organization_school', this.mmj_1);
    this.zmp_1 = new StringResource('i_want_to_join_my_organization_school_description', this.mmj_1);
    this.amq_1 = new StringResource('i_want_to_add_my_organization_school', this.mmj_1);
    this.bmq_1 = new StringResource('i_want_to_add_my_organization_school_description', this.mmj_1);
    this.cmq_1 = new StringResource('individual_action_title', this.mmj_1);
    this.dmq_1 = new StringResource('create_new_local_account_title', this.mmj_1);
    this.emq_1 = new StringResource('create_new_local_account_description', this.mmj_1);
    this.fmq_1 = new StringResource('restore_local_account_title', this.mmj_1);
    this.gmq_1 = new StringResource('restore_local_account_description', this.mmj_1);
    this.hmq_1 = new StringResource('download_continue_btn_label', this.mmj_1);
    this.imq_1 = new StringResource('download_wifi_only', this.mmj_1);
    this.jmq_1 = new StringResource('download_calculating', this.mmj_1);
    this.kmq_1 = new StringResource('download_state_download', this.mmj_1);
    this.lmq_1 = new StringResource('download_state_downloading', this.mmj_1);
    this.mmq_1 = new StringResource('download_state_downloaded', this.mmj_1);
    this.nmq_1 = new StringResource('download_downloading_placeholder', this.mmj_1);
    this.omq_1 = new StringResource('download_summary_title', this.mmj_1);
    this.pmq_1 = new StringResource('download_cancel_label', this.mmj_1);
    this.qmq_1 = new StringResource('download_pause_download', this.mmj_1);
    this.rmq_1 = new StringResource('download_storage_option_device', this.mmj_1);
    this.smq_1 = new StringResource('download_locally_availability', this.mmj_1);
    this.tmq_1 = new StringResource('download_cloud_availability', this.mmj_1);
    this.umq_1 = new StringResource('insufficient_space', this.mmj_1);
    this.vmq_1 = new StringResource('download_entry_state_paused', this.mmj_1);
    this.wmq_1 = new StringResource('get_app', this.mmj_1);
    this.xmq_1 = new StringResource('no_app_found', this.mmj_1);
    this.ymq_1 = new StringResource('entry_details_author', this.mmj_1);
    this.zmq_1 = new StringResource('entry_details_publisher', this.mmj_1);
    this.amr_1 = new StringResource('entry_details_license', this.mmj_1);
    this.bmr_1 = new StringResource('file_not_found', this.mmj_1);
    this.cmr_1 = new StringResource('multiple_choice', this.mmj_1);
    this.dmr_1 = new StringResource('preview', this.mmj_1);
    this.emr_1 = new StringResource('content_creation_storage_option_title', this.mmj_1);
    this.fmr_1 = new StringResource('file_required_prompt', this.mmj_1);
    this.gmr_1 = new StringResource('content_creation_folder_new_message', this.mmj_1);
    this.hmr_1 = new StringResource('content_creation_folder_update_message', this.mmj_1);
    this.imr_1 = new StringResource('error_message_load_page', this.mmj_1);
    this.jmr_1 = new StringResource('error_message_update_document', this.mmj_1);
    this.kmr_1 = new StringResource('supported_files', this.mmj_1);
    this.lmr_1 = new StringResource('content_editor_save_error', this.mmj_1);
    this.mmr_1 = new StringResource('content_entry_export_inprogress', this.mmj_1);
    this.nmr_1 = new StringResource('content_entry_export_message', this.mmj_1);
    this.omr_1 = new StringResource('show_hidden_items', this.mmj_1);
    this.pmr_1 = new StringResource('open_folder', this.mmj_1);
    this.qmr_1 = new StringResource('action_hidden', this.mmj_1);
    this.rmr_1 = new StringResource('invalid', this.mmj_1);
    this.smr_1 = new StringResource('enter_register_code', this.mmj_1);
    this.tmr_1 = new StringResource('bar_chart', this.mmj_1);
    this.umr_1 = new StringResource('line_chart', this.mmj_1);
    this.vmr_1 = new StringResource('score', this.mmj_1);
    this.wmr_1 = new StringResource('content_total_duration', this.mmj_1);
    this.xmr_1 = new StringResource('content_average_duration', this.mmj_1);
    this.ymr_1 = new StringResource('count_session', this.mmj_1);
    this.zmr_1 = new StringResource('interaction_recorded', this.mmj_1);
    this.ams_1 = new StringResource('number_active_users', this.mmj_1);
    this.bms_1 = new StringResource('average_usage_time_per_user', this.mmj_1);
    this.cms_1 = new StringResource('number_students_completed', this.mmj_1);
    this.dms_1 = new StringResource('percent_students_completed', this.mmj_1);
    this.ems_1 = new StringResource('total_attendances', this.mmj_1);
    this.fms_1 = new StringResource('total_absences', this.mmj_1);
    this.gms_1 = new StringResource('total_lates', this.mmj_1);
    this.hms_1 = new StringResource('percent_students_attended', this.mmj_1);
    this.ims_1 = new StringResource('percent_students_attended_or_late', this.mmj_1);
    this.jms_1 = new StringResource('total_number_of_classes', this.mmj_1);
    this.kms_1 = new StringResource('number_unique_students_attending', this.mmj_1);
    this.lms_1 = new StringResource('xapi_day', this.mmj_1);
    this.mms_1 = new StringResource('xapi_week', this.mmj_1);
    this.nms_1 = new StringResource('xapi_month', this.mmj_1);
    this.oms_1 = new StringResource('xapi_custom_date', this.mmj_1);
    this.pms_1 = new StringResource('xapi_content_entry', this.mmj_1);
    this.qms_1 = new StringResource('xapi_clear', this.mmj_1);
    this.rms_1 = new StringResource('last_week_date_range', this.mmj_1);
    this.sms_1 = new StringResource('last_two_week_date_range', this.mmj_1);
    this.tms_1 = new StringResource('last_month_date_range', this.mmj_1);
    this.ums_1 = new StringResource('last_three_months_date_range', this.mmj_1);
    this.vms_1 = new StringResource('new_custom_date_range', this.mmj_1);
    this.wms_1 = new StringResource('selected_custom_range', this.mmj_1);
    this.xms_1 = new StringResource('time_range', this.mmj_1);
    this.yms_1 = new StringResource('year', this.mmj_1);
    this.zms_1 = new StringResource('from', this.mmj_1);
    this.amt_1 = new StringResource('done', this.mmj_1);
    this.bmt_1 = new StringResource('xapi_options_general', this.mmj_1);
    this.cmt_1 = new StringResource('xapi_options_report_title', this.mmj_1);
    this.dmt_1 = new StringResource('xapi_options_visual_type', this.mmj_1);
    this.emt_1 = new StringResource('xapi_options_data_set', this.mmj_1);
    this.fmt_1 = new StringResource('xapi_options_series', this.mmj_1);
    this.gmt_1 = new StringResource('xapi_options_axes', this.mmj_1);
    this.hmt_1 = new StringResource('xapi_options_y_axes', this.mmj_1);
    this.imt_1 = new StringResource('xapi_options_x_axes', this.mmj_1);
    this.jmt_1 = new StringResource('xapi_options_subgroup', this.mmj_1);
    this.kmt_1 = new StringResource('xapi_options_filters', this.mmj_1);
    this.lmt_1 = new StringResource('xapi_options_who', this.mmj_1);
    this.mmt_1 = new StringResource('xapi_options_did', this.mmj_1);
    this.nmt_1 = new StringResource('xapi_options_what', this.mmj_1);
    this.omt_1 = new StringResource('xapi_options_when', this.mmj_1);
    this.pmt_1 = new StringResource('xapi_options_where', this.mmj_1);
    this.qmt_1 = new StringResource('time_range_all', this.mmj_1);
    this.rmt_1 = new StringResource('report_filter_edit_field', this.mmj_1);
    this.smt_1 = new StringResource('report_filter_edit_condition', this.mmj_1);
    this.tmt_1 = new StringResource('report_filter_edit_values', this.mmj_1);
    this.umt_1 = new StringResource('report', this.mmj_1);
    this.vmt_1 = new StringResource('create_a_new_report', this.mmj_1);
    this.wmt_1 = new StringResource('edit_report', this.mmj_1);
    this.xmt_1 = new StringResource('verb', this.mmj_1);
    this.ymt_1 = new StringResource('add_a_new_verb', this.mmj_1);
    this.zmt_1 = new StringResource('id_verbentity_urlid', this.mmj_1);
    this.amu_1 = new StringResource('edit_filters', this.mmj_1);
    this.bmu_1 = new StringResource('field_person_gender', this.mmj_1);
    this.cmu_1 = new StringResource('field_person_age', this.mmj_1);
    this.dmu_1 = new StringResource('field_content_completion', this.mmj_1);
    this.emu_1 = new StringResource('field_content_entry', this.mmj_1);
    this.fmu_1 = new StringResource('field_content_progress', this.mmj_1);
    this.gmu_1 = new StringResource('field_attendance_percentage', this.mmj_1);
    this.hmu_1 = new StringResource('condition_is', this.mmj_1);
    this.imu_1 = new StringResource('condition_is_not', this.mmj_1);
    this.jmu_1 = new StringResource('condition_greater_than', this.mmj_1);
    this.kmu_1 = new StringResource('condition_less_than', this.mmj_1);
    this.lmu_1 = new StringResource('condition_in_list', this.mmj_1);
    this.mmu_1 = new StringResource('condition_not_in_list', this.mmj_1);
    this.nmu_1 = new StringResource('condition_between', this.mmj_1);
    this.omu_1 = new StringResource('add_person_filter', this.mmj_1);
    this.pmu_1 = new StringResource('add_verb_filter', this.mmj_1);
    this.qmu_1 = new StringResource('add_content_filter', this.mmj_1);
    this.rmu_1 = new StringResource('dashboard', this.mmj_1);
    this.smu_1 = new StringResource('activity_import_link', this.mmj_1);
    this.tmu_1 = new StringResource('xapi_hours', this.mmj_1);
    this.umu_1 = new StringResource('xapi_minutes', this.mmj_1);
    this.vmu_1 = new StringResource('xapi_seconds', this.mmj_1);
    this.wmu_1 = new StringResource('xapi_verb_header', this.mmj_1);
    this.xmu_1 = new StringResource('xapi_result_header', this.mmj_1);
    this.ymu_1 = new StringResource('xapi_score', this.mmj_1);
    this.zmu_1 = new StringResource('content_score', this.mmj_1);
    this.amv_1 = new StringResource('completion_key', this.mmj_1);
    this.bmv_1 = new StringResource('import_title_not_entered', this.mmj_1);
    this.cmv_1 = new StringResource('no_account', this.mmj_1);
    this.dmv_1 = new StringResource('enter_url', this.mmj_1);
    this.emv_1 = new StringResource('invalid_link', this.mmj_1);
    this.fmv_1 = new StringResource('invalid_file', this.mmj_1);
    this.gmv_1 = new StringResource('import_link_content_not_supported', this.mmj_1);
    this.hmv_1 = new StringResource('unsupported_file_type', this.mmj_1);
    this.imv_1 = new StringResource('import_link_big_size', this.mmj_1);
    this.jmv_1 = new StringResource('import_link_error', this.mmj_1);
    this.kmv_1 = new StringResource('supported_link', this.mmj_1);
    this.lmv_1 = new StringResource('offline_sharing_enable_bluetooth_prompt', this.mmj_1);
    this.mmv_1 = new StringResource('offline_sharing_enable_wifi_promot', this.mmj_1);
    this.nmv_1 = new StringResource('enable', this.mmj_1);
    this.omv_1 = new StringResource('repo_loading_status_loading_cloud', this.mmj_1);
    this.pmv_1 = new StringResource('repo_loading_status_loading_mirror', this.mmj_1);
    this.qmv_1 = new StringResource('repo_loading_status_failed_noconnection', this.mmj_1);
    this.rmv_1 = new StringResource('repo_loading_status_failed_connection_error', this.mmj_1);
    this.smv_1 = new StringResource('licence_type_cc_by', this.mmj_1);
    this.tmv_1 = new StringResource('licence_type_cc_by_sa', this.mmj_1);
    this.umv_1 = new StringResource('licence_type_cc_by_sa_nc', this.mmj_1);
    this.vmv_1 = new StringResource('licence_type_cc_by_nc', this.mmj_1);
    this.wmv_1 = new StringResource('licence_type_cc_by_nc_sa', this.mmj_1);
    this.xmv_1 = new StringResource('licence_type_public_domain', this.mmj_1);
    this.ymv_1 = new StringResource('licence_type_all_rights', this.mmj_1);
    this.zmv_1 = new StringResource('license_type_cc_0', this.mmj_1);
    this.amw_1 = new StringResource('syncing', this.mmj_1);
    this.bmw_1 = new StringResource('feed', this.mmj_1);
    this.cmw_1 = new StringResource('people', this.mmj_1);
    this.dmw_1 = new StringResource('record_attendance', this.mmj_1);
    this.emw_1 = new StringResource('today', this.mmj_1);
    this.fmw_1 = new StringResource('sort_by', this.mmj_1);
    this.gmw_1 = new StringResource('log', this.mmj_1);
    this.hmw_1 = new StringResource('schedule', this.mmj_1);
    this.imw_1 = new StringResource('add_a_schedule', this.mmj_1);
    this.jmw_1 = new StringResource('edit_schedule', this.mmj_1);
    this.kmw_1 = new StringResource('first_key', this.mmj_1);
    this.lmw_1 = new StringResource('last_key', this.mmj_1);
    this.mmw_1 = new StringResource('last_week', this.mmj_1);
    this.nmw_1 = new StringResource('mark_all', this.mmj_1);
    this.omw_1 = new StringResource('mark_all_present', this.mmj_1);
    this.pmw_1 = new StringResource('mark_all_absent', this.mmj_1);
    this.qmw_1 = new StringResource('present', this.mmj_1);
    this.rmw_1 = new StringResource('absent', this.mmj_1);
    this.smw_1 = new StringResource('attendance_report', this.mmj_1);
    this.tmw_1 = new StringResource('father', this.mmj_1);
    this.umw_1 = new StringResource('mother', this.mmj_1);
    this.vmw_1 = new StringResource('birthday', this.mmj_1);
    this.wmw_1 = new StringResource('first_names', this.mmj_1);
    this.xmw_1 = new StringResource('basic_details', this.mmj_1);
    this.ymw_1 = new StringResource('address', this.mmj_1);
    this.zmw_1 = new StringResource('add_person_to_class', this.mmj_1);
    this.amx_1 = new StringResource('edit', this.mmj_1);
    this.bmx_1 = new StringResource('clazz', this.mmj_1);
    this.cmx_1 = new StringResource('add_a_new_class', this.mmj_1);
    this.dmx_1 = new StringResource('edit_clazz', this.mmj_1);
    this.emx_1 = new StringResource('add_a_class', this.mmj_1);
    this.fmx_1 = new StringResource('join_existing_class', this.mmj_1);
    this.gmx_1 = new StringResource('student_image', this.mmj_1);
    this.hmx_1 = new StringResource('question_key', this.mmj_1);
    this.imx_1 = new StringResource('add_question', this.mmj_1);
    this.jmx_1 = new StringResource('edit_question', this.mmj_1);
    this.kmx_1 = new StringResource('questions', this.mmj_1);
    this.lmx_1 = new StringResource('add_person', this.mmj_1);
    this.mmx_1 = new StringResource('add_class', this.mmj_1);
    this.nmx_1 = new StringResource('class_name', this.mmj_1);
    this.omx_1 = new StringResource('class_description', this.mmj_1);
    this.pmx_1 = new StringResource('to_key', this.mmj_1);
    this.qmx_1 = new StringResource('holiday', this.mmj_1);
    this.rmx_1 = new StringResource('add_a_holiday', this.mmj_1);
    this.smx_1 = new StringResource('edit_holiday', this.mmj_1);
    this.tmx_1 = new StringResource('holidays', this.mmj_1);
    this.umx_1 = new StringResource('holiday_calendar', this.mmj_1);
    this.vmx_1 = new StringResource('add_a_new_holiday_calendar', this.mmj_1);
    this.wmx_1 = new StringResource('edit_holiday_calendar', this.mmj_1);
    this.xmx_1 = new StringResource('features_enabled', this.mmj_1);
    this.ymx_1 = new StringResource('weekly', this.mmj_1);
    this.zmx_1 = new StringResource('once', this.mmj_1);
    this.amy_1 = new StringResource('daily', this.mmj_1);
    this.bmy_1 = new StringResource('monthly', this.mmj_1);
    this.cmy_1 = new StringResource('yearly', this.mmj_1);
    this.dmy_1 = new StringResource('sunday', this.mmj_1);
    this.emy_1 = new StringResource('monday', this.mmj_1);
    this.fmy_1 = new StringResource('tuesday', this.mmj_1);
    this.gmy_1 = new StringResource('wednesday', this.mmj_1);
    this.hmy_1 = new StringResource('thursday', this.mmj_1);
    this.imy_1 = new StringResource('friday', this.mmj_1);
    this.jmy_1 = new StringResource('saturday', this.mmj_1);
    this.kmy_1 = new StringResource('day', this.mmj_1);
    this.lmy_1 = new StringResource('toC', this.mmj_1);
    this.mmy_1 = new StringResource('last_month', this.mmj_1);
    this.nmy_1 = new StringResource('activity_change', this.mmj_1);
    this.omy_1 = new StringResource('change_implemented_if_any', this.mmj_1);
    this.pmy_1 = new StringResource('duration', this.mmj_1);
    this.qmy_1 = new StringResource('how_did_it_go', this.mmj_1);
    this.rmy_1 = new StringResource('notes', this.mmj_1);
    this.smy_1 = new StringResource('activity', this.mmj_1);
    this.tmy_1 = new StringResource('sort_by_name', this.mmj_1);
    this.umy_1 = new StringResource('sort_by_name_asc', this.mmj_1);
    this.vmy_1 = new StringResource('sort_by_name_desc', this.mmj_1);
    this.wmy_1 = new StringResource('date_enroll', this.mmj_1);
    this.xmy_1 = new StringResource('date_left', this.mmj_1);
    this.ymy_1 = new StringResource('enroled', this.mmj_1);
    this.zmy_1 = new StringResource('class_enrolment', this.mmj_1);
    this.amz_1 = new StringResource('graduated', this.mmj_1);
    this.bmz_1 = new StringResource('dropped_out', this.mmj_1);
    this.cmz_1 = new StringResource('moved', this.mmj_1);
    this.dmz_1 = new StringResource('new_leaving_reason', this.mmj_1);
    this.emz_1 = new StringResource('edit_leaving_reason', this.mmj_1);
    this.fmz_1 = new StringResource('edit_enrolment', this.mmj_1);
    this.gmz_1 = new StringResource('new_enrolment', this.mmj_1);
    this.hmz_1 = new StringResource('select_leaving_reason', this.mmj_1);
    this.imz_1 = new StringResource('add_leaving_reason', this.mmj_1);
    this.jmz_1 = new StringResource('leaving_reason', this.mmj_1);
    this.kmz_1 = new StringResource('leaving_reasons', this.mmj_1);
    this.lmz_1 = new StringResource('leaving_reason_manage', this.mmj_1);
    this.mmz_1 = new StringResource('view_profile', this.mmj_1);
    this.nmz_1 = new StringResource('class_enrolment_outcome', this.mmj_1);
    this.omz_1 = new StringResource('class_enrolment_leaving', this.mmj_1);
    this.pmz_1 = new StringResource('in_progress', this.mmj_1);
    this.qmz_1 = new StringResource('outcome', this.mmj_1);
    this.rmz_1 = new StringResource('person_enrolment_in_class', this.mmj_1);
    this.smz_1 = new StringResource('enrolment', this.mmj_1);
    this.tmz_1 = new StringResource('error_start_date_before_clazz_date', this.mmj_1);
    this.umz_1 = new StringResource('error_start_date_before_previous_enrolment_date', this.mmj_1);
    this.vmz_1 = new StringResource('time_present', this.mmj_1);
    this.wmz_1 = new StringResource('ascending', this.mmj_1);
    this.xmz_1 = new StringResource('descending', this.mmj_1);
    this.ymz_1 = new StringResource('sort_by_text', this.mmj_1);
    this.zmz_1 = new StringResource('attendance_high_to_low', this.mmj_1);
    this.an0_1 = new StringResource('attendance_low_to_high', this.mmj_1);
    this.bn0_1 = new StringResource('teacher', this.mmj_1);
    this.cn0_1 = new StringResource('add_a_teacher', this.mmj_1);
    this.dn0_1 = new StringResource('partial', this.mmj_1);
    this.en0_1 = new StringResource('teachers_literal', this.mmj_1);
    this.fn0_1 = new StringResource('participant', this.mmj_1);
    this.gn0_1 = new StringResource('primary_user', this.mmj_1);
    this.hn0_1 = new StringResource('up_key', this.mmj_1);
    this.in0_1 = new StringResource('down_key', this.mmj_1);
    this.jn0_1 = new StringResource('activity_went_good', this.mmj_1);
    this.kn0_1 = new StringResource('activity_went_bad', this.mmj_1);
    this.ln0_1 = new StringResource('activity_enter_any_notes', this.mmj_1);
    this.mn0_1 = new StringResource('uom_frequency_title', this.mmj_1);
    this.nn0_1 = new StringResource('uom_duration_title', this.mmj_1);
    this.on0_1 = new StringResource('uom_boolean_title', this.mmj_1);
    this.pn0_1 = new StringResource('uom_default_title', this.mmj_1);
    this.qn0_1 = new StringResource('add_activity', this.mmj_1);
    this.rn0_1 = new StringResource('add_activity_literal', this.mmj_1);
    this.sn0_1 = new StringResource('select_one', this.mmj_1);
    this.tn0_1 = new StringResource('measurement_type', this.mmj_1);
    this.un0_1 = new StringResource('frequency', this.mmj_1);
    this.vn0_1 = new StringResource('yes_no', this.mmj_1);
    this.wn0_1 = new StringResource('time_period', this.mmj_1);
    this.xn0_1 = new StringResource('location', this.mmj_1);
    this.yn0_1 = new StringResource('last_three_months', this.mmj_1);
    this.zn0_1 = new StringResource('export', this.mmj_1);
    this.an1_1 = new StringResource('date', this.mmj_1);
    this.bn1_1 = new StringResource('average', this.mmj_1);
    this.cn1_1 = new StringResource('age', this.mmj_1);
    this.dn1_1 = new StringResource('days', this.mmj_1);
    this.en1_1 = new StringResource('apply', this.mmj_1);
    this.fn1_1 = new StringResource('file_selected', this.mmj_1);
    this.gn1_1 = new StringResource('all', this.mmj_1);
    this.hn1_1 = new StringResource('holiday_calendars', this.mmj_1);
    this.in1_1 = new StringResource('holiday_calendars_desc', this.mmj_1);
    this.jn1_1 = new StringResource('sel_question_set', this.mmj_1);
    this.kn1_1 = new StringResource('sel_question_set_desc', this.mmj_1);
    this.ln1_1 = new StringResource('users', this.mmj_1);
    this.mn1_1 = new StringResource('nomination', this.mmj_1);
    this.nn1_1 = new StringResource('active', this.mmj_1);
    this.on1_1 = new StringResource('class_id', this.mmj_1);
    this.pn1_1 = new StringResource('gender_literal', this.mmj_1);
    this.qn1_1 = new StringResource('country', this.mmj_1);
    this.rn1_1 = new StringResource('connectivity', this.mmj_1);
    this.sn1_1 = new StringResource('home_internet_access', this.mmj_1);
    this.tn1_1 = new StringResource('mobile_internet_access', this.mmj_1);
    this.un1_1 = new StringResource('connectivity_limited', this.mmj_1);
    this.vn1_1 = new StringResource('connectivity_full', this.mmj_1);
    this.wn1_1 = new StringResource('prefer_not_to_say', this.mmj_1);
    this.xn1_1 = new StringResource('sel_question_set_to_use', this.mmj_1);
    this.yn1_1 = new StringResource('search', this.mmj_1);
    this.zn1_1 = new StringResource('attendance_percentage', this.mmj_1);
    this.an2_1 = new StringResource('filter', this.mmj_1);
    this.bn2_1 = new StringResource('over_key', this.mmj_1);
    this.cn2_1 = new StringResource('sync', this.mmj_1);
    this.dn2_1 = new StringResource('not_recorded', this.mmj_1);
    this.en2_1 = new StringResource('groups', this.mmj_1);
    this.fn2_1 = new StringResource('group_setting_desc', this.mmj_1);
    this.gn2_1 = new StringResource('roles', this.mmj_1);
    this.hn2_1 = new StringResource('role', this.mmj_1);
    this.in2_1 = new StringResource('add_a_new_role', this.mmj_1);
    this.jn2_1 = new StringResource('edit_role', this.mmj_1);
    this.kn2_1 = new StringResource('rols_assignment', this.mmj_1);
    this.ln2_1 = new StringResource('role_assignment_setting_desc', this.mmj_1);
    this.mn2_1 = new StringResource('locations', this.mmj_1);
    this.nn2_1 = new StringResource('locations_setting_desc', this.mmj_1);
    this.on2_1 = new StringResource('audit_log', this.mmj_1);
    this.pn2_1 = new StringResource('audit_log_setting_desc', this.mmj_1);
    this.qn2_1 = new StringResource('entry_key', this.mmj_1);
    this.rn2_1 = new StringResource('permission_key', this.mmj_1);
    this.sn2_1 = new StringResource('permissions', this.mmj_1);
    this.tn2_1 = new StringResource('role_name', this.mmj_1);
    this.un2_1 = new StringResource('members_key', this.mmj_1);
    this.vn2_1 = new StringResource('member_key', this.mmj_1);
    this.wn2_1 = new StringResource('role_assignment', this.mmj_1);
    this.xn2_1 = new StringResource('scope_by', this.mmj_1);
    this.yn2_1 = new StringResource('assign_to', this.mmj_1);
    this.zn2_1 = new StringResource('person', this.mmj_1);
    this.an3_1 = new StringResource('add_a_new_person', this.mmj_1);
    this.bn3_1 = new StringResource('edit_person', this.mmj_1);
    this.cn3_1 = new StringResource('permission_person_select', this.mmj_1);
    this.dn3_1 = new StringResource('permission_person_insert', this.mmj_1);
    this.en3_1 = new StringResource('permission_person_update', this.mmj_1);
    this.fn3_1 = new StringResource('permission_person_picture_select', this.mmj_1);
    this.gn3_1 = new StringResource('permission_person_picture_insert', this.mmj_1);
    this.hn3_1 = new StringResource('permission_person_picture_update', this.mmj_1);
    this.in3_1 = new StringResource('permission_clazz_select', this.mmj_1);
    this.jn3_1 = new StringResource('permission_clazz_insert', this.mmj_1);
    this.kn3_1 = new StringResource('permission_clazz_update', this.mmj_1);
    this.ln3_1 = new StringResource('permission_clazz_add_teacher', this.mmj_1);
    this.mn3_1 = new StringResource('permission_clazz_add_student', this.mmj_1);
    this.nn3_1 = new StringResource('permission_attendance_select', this.mmj_1);
    this.on3_1 = new StringResource('permission_attendance_insert', this.mmj_1);
    this.pn3_1 = new StringResource('permission_attendance_update', this.mmj_1);
    this.qn3_1 = new StringResource('permission_activity_select', this.mmj_1);
    this.rn3_1 = new StringResource('permission_activity_insert', this.mmj_1);
    this.sn3_1 = new StringResource('permission_activity_update', this.mmj_1);
    this.tn3_1 = new StringResource('permission_sel_question_select', this.mmj_1);
    this.un3_1 = new StringResource('permission_sel_question_insert', this.mmj_1);
    this.vn3_1 = new StringResource('permission_sel_question_update', this.mmj_1);
    this.wn3_1 = new StringResource('permission_sel_select', this.mmj_1);
    this.xn3_1 = new StringResource('permission_sel_update', this.mmj_1);
    this.yn3_1 = new StringResource('custom_fields', this.mmj_1);
    this.zn3_1 = new StringResource('custom_field', this.mmj_1);
    this.an4_1 = new StringResource('custom_fields_desc', this.mmj_1);
    this.bn4_1 = new StringResource('field_type', this.mmj_1);
    this.cn4_1 = new StringResource('text', this.mmj_1);
    this.dn4_1 = new StringResource('dropdown', this.mmj_1);
    this.en4_1 = new StringResource('options', this.mmj_1);
    this.fn4_1 = new StringResource('option_value', this.mmj_1);
    this.gn4_1 = new StringResource('errors', this.mmj_1);
    this.hn4_1 = new StringResource('shake_feedback', this.mmj_1);
    this.in4_1 = new StringResource('feedback_hint', this.mmj_1);
    this.jn4_1 = new StringResource('send_feedback', this.mmj_1);
    this.kn4_1 = new StringResource('feedback_thanks', this.mmj_1);
    this.ln4_1 = new StringResource('start_date', this.mmj_1);
    this.mn4_1 = new StringResource('end_date', this.mmj_1);
    this.nn4_1 = new StringResource('last_active', this.mmj_1);
    this.on4_1 = new StringResource('save', this.mmj_1);
    this.pn4_1 = new StringResource('change_password', this.mmj_1);
    this.qn4_1 = new StringResource('current_password', this.mmj_1);
    this.rn4_1 = new StringResource('password_unchanged', this.mmj_1);
    this.sn4_1 = new StringResource('timezone', this.mmj_1);
    this.tn4_1 = new StringResource('users_settings_desc', this.mmj_1);
    this.un4_1 = new StringResource('add', this.mmj_1);
    this.vn4_1 = new StringResource('refresh', this.mmj_1);
    this.wn4_1 = new StringResource('school', this.mmj_1);
    this.xn4_1 = new StringResource('add_a_new_school', this.mmj_1);
    this.yn4_1 = new StringResource('edit_school', this.mmj_1);
    this.zn4_1 = new StringResource('join_existing_school', this.mmj_1);
    this.an5_1 = new StringResource('schools', this.mmj_1);
    this.bn5_1 = new StringResource('assignments', this.mmj_1);
    this.cn5_1 = new StringResource('assignment', this.mmj_1);
    this.dn5_1 = new StringResource('none_key', this.mmj_1);
    this.en5_1 = new StringResource('instructions_for_students', this.mmj_1);
    this.fn5_1 = new StringResource('not_started', this.mmj_1);
    this.gn5_1 = new StringResource('percentage_complete', this.mmj_1);
    this.hn5_1 = new StringResource('percentage_score', this.mmj_1);
    this.in5_1 = new StringResource('started_date', this.mmj_1);
    this.jn5_1 = new StringResource('started', this.mmj_1);
    this.kn5_1 = new StringResource('mixed', this.mmj_1);
    this.ln5_1 = new StringResource('store_title', this.mmj_1);
    this.mn5_1 = new StringResource('store_description_short', this.mmj_1);
    this.nn5_1 = new StringResource('store_description_full', this.mmj_1);
    this.on5_1 = new StringResource('due_date', this.mmj_1);
    this.pn5_1 = new StringResource('content', this.mmj_1);
    this.qn5_1 = new StringResource('add_new_content', this.mmj_1);
    this.rn5_1 = new StringResource('add_content', this.mmj_1);
    this.sn5_1 = new StringResource('student_progress', this.mmj_1);
    this.tn5_1 = new StringResource('status', this.mmj_1);
    this.un5_1 = new StringResource('use_device_language', this.mmj_1);
    this.vn5_1 = new StringResource('select_item', this.mmj_1);
    this.wn5_1 = new StringResource('from_to_date', this.mmj_1);
    this.xn5_1 = new StringResource('num_items_with_name', this.mmj_1);
    this.yn5_1 = new StringResource('num_items_with_name_with_comma', this.mmj_1);
    this.zn5_1 = new StringResource('add_to', this.mmj_1);
    this.an6_1 = new StringResource('remove_from', this.mmj_1);
    this.bn6_1 = new StringResource('change_photo', this.mmj_1);
    this.cn6_1 = new StringResource('remove_picture', this.mmj_1);
    this.dn6_1 = new StringResource('take_new_photo_from_camera', this.mmj_1);
    this.en6_1 = new StringResource('select_picture_from_gallery', this.mmj_1);
    this.fn6_1 = new StringResource('select_file', this.mmj_1);
    this.gn6_1 = new StringResource('permission_clazz_assignment_view', this.mmj_1);
    this.hn6_1 = new StringResource('permission_clazz_asignment_edit', this.mmj_1);
    this.in6_1 = new StringResource('overview', this.mmj_1);
    this.jn6_1 = new StringResource('add_new', this.mmj_1);
    this.kn6_1 = new StringResource('staff', this.mmj_1);
    this.ln6_1 = new StringResource('x_teachers_y_students', this.mmj_1);
    this.mn6_1 = new StringResource('call', this.mmj_1);
    this.nn6_1 = new StringResource('organization_id', this.mmj_1);
    this.on6_1 = new StringResource('student', this.mmj_1);
    this.pn6_1 = new StringResource('contact_details', this.mmj_1);
    this.qn6_1 = new StringResource('untitled', this.mmj_1);
    this.rn6_1 = new StringResource('present_late_absent', this.mmj_1);
    this.sn6_1 = new StringResource('marked_cap', this.mmj_1);
    this.tn6_1 = new StringResource('submitted_cap', this.mmj_1);
    this.un6_1 = new StringResource('not_submitted_cap', this.mmj_1);
    this.vn6_1 = new StringResource('submitliteral', this.mmj_1);
    this.wn6_1 = new StringResource('x_percent_attended', this.mmj_1);
    this.xn6_1 = new StringResource('answer', this.mmj_1);
    this.yn6_1 = new StringResource('of_content', this.mmj_1);
    this.zn6_1 = new StringResource('nothing_here', this.mmj_1);
    this.an7_1 = new StringResource('not_answered', this.mmj_1);
    this.bn7_1 = new StringResource('clazz_work', this.mmj_1);
    this.cn7_1 = new StringResource('add_a_new_clazzwork', this.mmj_1);
    this.dn7_1 = new StringResource('edit_clazzwork', this.mmj_1);
    this.en7_1 = new StringResource('clazz_assignment', this.mmj_1);
    this.fn7_1 = new StringResource('new_assignment', this.mmj_1);
    this.gn7_1 = new StringResource('edit_assignment', this.mmj_1);
    this.hn7_1 = new StringResource('total_score', this.mmj_1);
    this.in7_1 = new StringResource('late_submission', this.mmj_1);
    this.jn7_1 = new StringResource('mark_penalty', this.mmj_1);
    this.kn7_1 = new StringResource('late_submission_penalty', this.mmj_1);
    this.ln7_1 = new StringResource('end_of_grace_period', this.mmj_1);
    this.mn7_1 = new StringResource('allow_class_comments', this.mmj_1);
    this.nn7_1 = new StringResource('after_deadline_date_error', this.mmj_1);
    this.on7_1 = new StringResource('points', this.mmj_1);
    this.pn7_1 = new StringResource('minimum_score', this.mmj_1);
    this.qn7_1 = new StringResource('automatic', this.mmj_1);
    this.rn7_1 = new StringResource('student_marks_content', this.mmj_1);
    this.sn7_1 = new StringResource('completion_criteria', this.mmj_1);
    this.tn7_1 = new StringResource('mark_complete', this.mmj_1);
    this.un7_1 = new StringResource('late_penalty', this.mmj_1);
    this.vn7_1 = new StringResource('marked_key', this.mmj_1);
    this.wn7_1 = new StringResource('submitted_key', this.mmj_1);
    this.xn7_1 = new StringResource('not_submitted', this.mmj_1);
    this.yn7_1 = new StringResource('visible_from_date', this.mmj_1);
    this.zn7_1 = new StringResource('submission_type', this.mmj_1);
    this.an8_1 = new StringResource('no_submission_required', this.mmj_1);
    this.bn8_1 = new StringResource('short_text', this.mmj_1);
    this.cn8_1 = new StringResource('attachment', this.mmj_1);
    this.dn8_1 = new StringResource('quiz', this.mmj_1);
    this.en8_1 = new StringResource('allow_private_comments_from_students', this.mmj_1);
    this.fn8_1 = new StringResource('deadline', this.mmj_1);
    this.gn8_1 = new StringResource('class_timezone', this.mmj_1);
    this.hn8_1 = new StringResource('maximum_score', this.mmj_1);
    this.in8_1 = new StringResource('quiz_questions', this.mmj_1);
    this.jn8_1 = new StringResource('time', this.mmj_1);
    this.kn8_1 = new StringResource('submission', this.mmj_1);
    this.ln8_1 = new StringResource('public_comments', this.mmj_1);
    this.mn8_1 = new StringResource('private_comments', this.mmj_1);
    this.nn8_1 = new StringResource('submit_your_answer', this.mmj_1);
    this.on8_1 = new StringResource('add_class_comment', this.mmj_1);
    this.pn8_1 = new StringResource('add_private_comment', this.mmj_1);
    this.qn8_1 = new StringResource('class_comments', this.mmj_1);
    this.rn8_1 = new StringResource('submit', this.mmj_1);
    this.sn8_1 = new StringResource('three_num_items_with_name_with_comma', this.mmj_1);
    this.tn8_1 = new StringResource('marking', this.mmj_1);
    this.un8_1 = new StringResource('return_and_mark_next', this.mmj_1);
    this.vn8_1 = new StringResource('return_only', this.mmj_1);
    this.wn8_1 = new StringResource('workspace', this.mmj_1);
    this.xn8_1 = new StringResource('organisation', this.mmj_1);
    this.yn8_1 = new StringResource('use_public_library_site', this.mmj_1);
    this.zn8_1 = new StringResource('create_site', this.mmj_1);
    this.an9_1 = new StringResource('connect_as_guest', this.mmj_1);
    this.bn9_1 = new StringResource('create_account', this.mmj_1);
    this.cn9_1 = new StringResource('my', this.mmj_1);
    this.dn9_1 = new StringResource('add_another', this.mmj_1);
    this.en9_1 = new StringResource('logged_in_as', this.mmj_1);
    this.fn9_1 = new StringResource('person_exists', this.mmj_1);
    this.gn9_1 = new StringResource('username_too_short', this.mmj_1);
    this.hn9_1 = new StringResource('username_too_long', this.mmj_1);
    this.in9_1 = new StringResource('username_starts_with_number', this.mmj_1);
    this.jn9_1 = new StringResource('invalid_username', this.mmj_1);
    this.kn9_1 = new StringResource('incorrect_current_password', this.mmj_1);
    this.ln9_1 = new StringResource('sel_question_type_free_text', this.mmj_1);
    this.mn9_1 = new StringResource('sel_question_type_multiple_choice', this.mmj_1);
    this.nn9_1 = new StringResource('question_text', this.mmj_1);
    this.on9_1 = new StringResource('question_type', this.mmj_1);
    this.pn9_1 = new StringResource('add_option', this.mmj_1);
    this.qn9_1 = new StringResource('roles_and_permissions', this.mmj_1);
    this.rn9_1 = new StringResource('add_role_permission', this.mmj_1);
    this.sn9_1 = new StringResource('scope', this.mmj_1);
    this.tn9_1 = new StringResource('scope_description', this.mmj_1);
    this.un9_1 = new StringResource('role_description', this.mmj_1);
    this.vn9_1 = new StringResource('assign_role', this.mmj_1);
    this.wn9_1 = new StringResource('more_information', this.mmj_1);
    this.xn9_1 = new StringResource('pending_requests', this.mmj_1);
    this.yn9_1 = new StringResource('pending', this.mmj_1);
    this.zn9_1 = new StringResource('please_wait_for_approval', this.mmj_1);
    this.ana_1 = new StringResource('reject', this.mmj_1);
    this.bna_1 = new StringResource('ask_your_teacher_for_code', this.mmj_1);
    this.cna_1 = new StringResource('copied_to_clipboard', this.mmj_1);
    this.dna_1 = new StringResource('invite_link_desc', this.mmj_1);
    this.ena_1 = new StringResource('copy_link', this.mmj_1);
    this.fna_1 = new StringResource('copy_code', this.mmj_1);
    this.gna_1 = new StringResource('share_link', this.mmj_1);
    this.hna_1 = new StringResource('invite_with_link', this.mmj_1);
    this.ina_1 = new StringResource('role_not_selected_error', this.mmj_1);
    this.jna_1 = new StringResource('permission_person_delegate', this.mmj_1);
    this.kna_1 = new StringResource('this_field_is_mandatory', this.mmj_1);
    this.lna_1 = new StringResource('permission_role_select', this.mmj_1);
    this.mna_1 = new StringResource('permission_role_insert', this.mmj_1);
    this.nna_1 = new StringResource('permission_school_select', this.mmj_1);
    this.ona_1 = new StringResource('permission_school_insert', this.mmj_1);
    this.pna_1 = new StringResource('permission_school_update', this.mmj_1);
    this.qna_1 = new StringResource('add_student_to_school', this.mmj_1);
    this.rna_1 = new StringResource('add_staff_to_school', this.mmj_1);
    this.sna_1 = new StringResource('permission_password_reset', this.mmj_1);
    this.tna_1 = new StringResource('school_code', this.mmj_1);
    this.una_1 = new StringResource('invite_code', this.mmj_1);
    this.vna_1 = new StringResource('entity_code', this.mmj_1);
    this.wna_1 = new StringResource('join_code_instructions', this.mmj_1);
    this.xna_1 = new StringResource('record_for_student', this.mmj_1);
    this.yna_1 = new StringResource('moved_x_entries', this.mmj_1);
    this.zna_1 = new StringResource('end_is_before_start_error', this.mmj_1);
    this.anb_1 = new StringResource('record_attendance_for_most_recent_occurrence', this.mmj_1);
    this.bnb_1 = new StringResource('add_a_new_occurrence', this.mmj_1);
    this.cnb_1 = new StringResource('active_classes', this.mmj_1);
    this.dnb_1 = new StringResource('terms_and_policies', this.mmj_1);
    this.enb_1 = new StringResource('manage_site_settings', this.mmj_1);
    this.fnb_1 = new StringResource('guest_login_enabled', this.mmj_1);
    this.gnb_1 = new StringResource('registration_allowed', this.mmj_1);
    this.hnb_1 = new StringResource('yes', this.mmj_1);
    this.inb_1 = new StringResource('no', this.mmj_1);
    this.jnb_1 = new StringResource('edit_site', this.mmj_1);
    this.knb_1 = new StringResource('site', this.mmj_1);
    this.lnb_1 = new StringResource('site_link', this.mmj_1);
    this.mnb_1 = new StringResource('please_enter_the_linK', this.mmj_1);
    this.nnb_1 = new StringResource('or', this.mmj_1);
    this.onb_1 = new StringResource('connect', this.mmj_1);
    this.pnb_1 = new StringResource('terms_and_policies_text', this.mmj_1);
    this.qnb_1 = new StringResource('edit_terms_and_policies', this.mmj_1);
    this.rnb_1 = new StringResource('strings_not_allowed', this.mmj_1);
    this.snb_1 = new StringResource('undo', this.mmj_1);
    this.tnb_1 = new StringResource('video', this.mmj_1);
    this.unb_1 = new StringResource('content_editor_create_new_category', this.mmj_1);
    this.vnb_1 = new StringResource('content_pieces_completed', this.mmj_1);
    this.wnb_1 = new StringResource('content_usage_duration', this.mmj_1);
    this.xnb_1 = new StringResource('manage_download', this.mmj_1);
    this.ynb_1 = new StringResource('powered_by', this.mmj_1);
    this.znb_1 = new StringResource('invalid_email', this.mmj_1);
    this.anc_1 = new StringResource('select_account', this.mmj_1);
    this.bnc_1 = new StringResource('opening_link', this.mmj_1);
    this.cnc_1 = new StringResource('select_account_to_continue', this.mmj_1);
    this.dnc_1 = new StringResource('you_are_already_in_class', this.mmj_1);
    this.enc_1 = new StringResource('you_are_already_in_school', this.mmj_1);
    this.fnc_1 = new StringResource('join_class', this.mmj_1);
    this.gnc_1 = new StringResource('join_school', this.mmj_1);
    this.hnc_1 = new StringResource('what_is_your_date_of_birth', this.mmj_1);
    this.inc_1 = new StringResource('parents_email_address', this.mmj_1);
    this.jnc_1 = new StringResource('we_sent_a_message_to_your_parent', this.mmj_1);
    this.knc_1 = new StringResource('toggle_visibility', this.mmj_1);
    this.lnc_1 = new StringResource('parental_consent', this.mmj_1);
    this.mnc_1 = new StringResource('parent_child_register_message_subject', this.mmj_1);
    this.nnc_1 = new StringResource('parent_child_register_message', this.mmj_1);
    this.onc_1 = new StringResource('parent_consent_explanation', this.mmj_1);
    this.pnc_1 = new StringResource('relationship', this.mmj_1);
    this.qnc_1 = new StringResource('i_consent', this.mmj_1);
    this.rnc_1 = new StringResource('i_do_not_consent', this.mmj_1);
    this.snc_1 = new StringResource('revoke_consent', this.mmj_1);
    this.tnc_1 = new StringResource('restore_consent', this.mmj_1);
    this.unc_1 = new StringResource('status_consent_granted', this.mmj_1);
    this.vnc_1 = new StringResource('status_consent_denied', this.mmj_1);
    this.wnc_1 = new StringResource('other_legal_guardian', this.mmj_1);
    this.xnc_1 = new StringResource('manage_parental_consent', this.mmj_1);
    this.ync_1 = new StringResource('view_class_content', this.mmj_1);
    this.znc_1 = new StringResource('edit_class_content', this.mmj_1);
    this.and_1 = new StringResource('view_class_learning_records', this.mmj_1);
    this.bnd_1 = new StringResource('view_contact_details_of_members', this.mmj_1);
    this.cnd_1 = new StringResource('edit_contact_details_of_members', this.mmj_1);
    this.dnd_1 = new StringResource('view_socioeconomic_details_of_members', this.mmj_1);
    this.end_1 = new StringResource('edit_socioeconomic_details_of_members', this.mmj_1);
    this.fnd_1 = new StringResource('add_person_or_group', this.mmj_1);
    this.gnd_1 = new StringResource('lets_get_started', this.mmj_1);
    this.hnd_1 = new StringResource('looks_like_installed_app_from_link', this.mmj_1);
    this.ind_1 = new StringResource('continue_using_link_recommended', this.mmj_1);
    this.jnd_1 = new StringResource('continue_using_the_link', this.mmj_1);
    this.knd_1 = new StringResource('start_from_scratch', this.mmj_1);
    this.lnd_1 = new StringResource('ignore_the_link', this.mmj_1);
    this.mnd_1 = new StringResource('add_permission_for_a_person', this.mmj_1);
    this.nnd_1 = new StringResource('add_permission_for_a_group', this.mmj_1);
    this.ond_1 = new StringResource('add_using_link', this.mmj_1);
    this.pnd_1 = new StringResource('add_using_a_web_link_then', this.mmj_1);
    this.qnd_1 = new StringResource('add_from_gallery', this.mmj_1);
    this.rnd_1 = new StringResource('add_video_or_audio_from_the_device_gallery', this.mmj_1);
    this.snd_1 = new StringResource('add_file', this.mmj_1);
    this.tnd_1 = new StringResource('add_folder', this.mmj_1);
    this.und_1 = new StringResource('importing', this.mmj_1);
    this.vnd_1 = new StringResource('downloading_content', this.mmj_1);
    this.wnd_1 = new StringResource('deleting_content', this.mmj_1);
    this.xnd_1 = new StringResource('add_folder_description', this.mmj_1);
    this.ynd_1 = new StringResource('add_educational_content_using_supported_formats_eg_pdf_xapi_h5p', this.mmj_1);
    this.znd_1 = new StringResource('current_status_consent_granted', this.mmj_1);
    this.ane_1 = new StringResource('select_country', this.mmj_1);
    this.bne_1 = new StringResource('enter_link', this.mmj_1);
    this.cne_1 = new StringResource('add_subject', this.mmj_1);
    this.dne_1 = new StringResource('share_via', this.mmj_1);
    this.ene_1 = new StringResource('share_apk_file', this.mmj_1);
    this.fne_1 = new StringResource('recommended_for_advanced_users', this.mmj_1);
    this.gne_1 = new StringResource('nearby_share', this.mmj_1);
    this.hne_1 = new StringResource('recommended_for_offline_installation', this.mmj_1);
    this.ine_1 = new StringResource('app_store_link', this.mmj_1);
    this.jne_1 = new StringResource('everything_works_offline', this.mmj_1);
    this.kne_1 = new StringResource('swipe_to_next', this.mmj_1);
    this.lne_1 = new StringResource('content_entries_completed', this.mmj_1);
    this.mne_1 = new StringResource('content_usage_time', this.mmj_1);
    this.nne_1 = new StringResource('all_permissions', this.mmj_1);
    this.one_1 = new StringResource('folder', this.mmj_1);
    this.pne_1 = new StringResource('create_a_new_learning_env', this.mmj_1);
    this.qne_1 = new StringResource('add_educational_content_to_new_learning_env', this.mmj_1);
    this.rne_1 = new StringResource('connect_to_an_existing_learning_environment', this.mmj_1);
    this.sne_1 = new StringResource('does_your_class_already_have_learning_env', this.mmj_1);
    this.tne_1 = new StringResource('use_the_public_lib_env', this.mmj_1);
    this.une_1 = new StringResource('just_want_to_browse', this.mmj_1);
    this.vne_1 = new StringResource('revoking_consent_will', this.mmj_1);
    this.wne_1 = new StringResource('you_must_comply_with_license', this.mmj_1);
    this.xne_1 = new StringResource('you_can_copypaste_a_link', this.mmj_1);
    this.yne_1 = new StringResource('see_supported_sites', this.mmj_1);
    this.zne_1 = new StringResource('class_setup', this.mmj_1);
    this.anf_1 = new StringResource('anyone_with_this_can_join_school', this.mmj_1);
    this.bnf_1 = new StringResource('this_class', this.mmj_1);
    this.cnf_1 = new StringResource('from_my_classes', this.mmj_1);
    this.dnf_1 = new StringResource('my_content', this.mmj_1);
    this.enf_1 = new StringResource('learning_environment', this.mmj_1);
    this.fnf_1 = new StringResource('grades_class_age', this.mmj_1);
    this.gnf_1 = new StringResource('add_remove_and_modify_grades', this.mmj_1);
    this.hnf_1 = new StringResource('subjects', this.mmj_1);
    this.inf_1 = new StringResource('add_remove_and_modify_subjects', this.mmj_1);
    this.jnf_1 = new StringResource('create_my_account', this.mmj_1);
    this.knf_1 = new StringResource('recommend_it', this.mmj_1);
    this.lnf_1 = new StringResource('edit_permissions', this.mmj_1);
    this.mnf_1 = new StringResource('add_from_contacts', this.mmj_1);
    this.nnf_1 = new StringResource('almost_done', this.mmj_1);
    this.onf_1 = new StringResource('your_username', this.mmj_1);
    this.pnf_1 = new StringResource('select_content', this.mmj_1);
    this.qnf_1 = new StringResource('search_in', this.mmj_1);
    this.rnf_1 = new StringResource('type', this.mmj_1);
    this.snf_1 = new StringResource('please_download_the_app', this.mmj_1);
    this.tnf_1 = new StringResource('alternatively_you_can_download_the_apk', this.mmj_1);
    this.unf_1 = new StringResource('full_i_can_download_as_much_as_i_like', this.mmj_1);
    this.vnf_1 = new StringResource('limited_i_avoid_downloading_too_much', this.mmj_1);
    this.wnf_1 = new StringResource('oops', this.mmj_1);
    this.xnf_1 = new StringResource('sorry_something_went_wrong', this.mmj_1);
    this.ynf_1 = new StringResource('incident_id', this.mmj_1);
    this.znf_1 = new StringResource('error_code', this.mmj_1);
    this.ang_1 = new StringResource('take_me_home', this.mmj_1);
    this.bng_1 = new StringResource('view_clazz', this.mmj_1);
    this.cng_1 = new StringResource('view_clazzes', this.mmj_1);
    this.dng_1 = new StringResource('enrol_and_unenrol_students', this.mmj_1);
    this.eng_1 = new StringResource('enrol_and_unenrol_teachers', this.mmj_1);
    this.fng_1 = new StringResource('view_assignments', this.mmj_1);
    this.gng_1 = new StringResource('add_or_edit_assignment', this.mmj_1);
    this.hng_1 = new StringResource('view_basic_profile_of_members', this.mmj_1);
    this.ing_1 = new StringResource('edit_basic_profile_of_members', this.mmj_1);
    this.jng_1 = new StringResource('view_school', this.mmj_1);
    this.kng_1 = new StringResource('edit_clazzes', this.mmj_1);
    this.lng_1 = new StringResource('add_new_clazz_to_school', this.mmj_1);
    this.mng_1 = new StringResource('added_to_class_content', this.mmj_1);
    this.nng_1 = new StringResource('content_already_added_to_class', this.mmj_1);
    this.ong_1 = new StringResource('your_account_needs_approved', this.mmj_1);
    this.png_1 = new StringResource('adult_account_required', this.mmj_1);
    this.qng_1 = new StringResource('blank_report', this.mmj_1);
    this.rng_1 = new StringResource('attendance_over_time_by_class', this.mmj_1);
    this.sng_1 = new StringResource('percentage_of_students_attending_over_time', this.mmj_1);
    this.tng_1 = new StringResource('content_completion', this.mmj_1);
    this.ung_1 = new StringResource('number_of_students_completed_time', this.mmj_1);
    this.vng_1 = new StringResource('content_usage_by_class', this.mmj_1);
    this.wng_1 = new StringResource('total_content_usage_duration_class', this.mmj_1);
    this.xng_1 = new StringResource('content_usage_over_time', this.mmj_1);
    this.yng_1 = new StringResource('total_content_duration_gender', this.mmj_1);
    this.zng_1 = new StringResource('unique_content_users_over_time', this.mmj_1);
    this.anh_1 = new StringResource('number_of_active_users_over_time', this.mmj_1);
    this.bnh_1 = new StringResource('parent', this.mmj_1);
    this.cnh_1 = new StringResource('upload', this.mmj_1);
    this.dnh_1 = new StringResource('selected_file_summary', this.mmj_1);
    this.enh_1 = new StringResource('drag_and_drop_or_click_to_add_file', this.mmj_1);
    this.fnh_1 = new StringResource('extra_active_tab_warning', this.mmj_1);
    this.gnh_1 = new StringResource('saved', this.mmj_1);
    this.hnh_1 = new StringResource('individual', this.mmj_1);
    this.inh_1 = new StringResource('group', this.mmj_1);
    this.jnh_1 = new StringResource('dont_show_before', this.mmj_1);
    this.knh_1 = new StringResource('group_submission', this.mmj_1);
    this.lnh_1 = new StringResource('require_file_submission', this.mmj_1);
    this.mnh_1 = new StringResource('require_text_submission', this.mmj_1);
    this.nnh_1 = new StringResource('maximum', this.mmj_1);
    this.onh_1 = new StringResource('size_limit', this.mmj_1);
    this.pnh_1 = new StringResource('size_limit_error', this.mmj_1);
    this.qnh_1 = new StringResource('limit', this.mmj_1);
    this.rnh_1 = new StringResource('number_of_files', this.mmj_1);
    this.snh_1 = new StringResource('edit_after_submission', this.mmj_1);
    this.tnh_1 = new StringResource('allowed_till_deadline', this.mmj_1);
    this.unh_1 = new StringResource('allowed_till_grace', this.mmj_1);
    this.vnh_1 = new StringResource('not_allowed', this.mmj_1);
    this.wnh_1 = new StringResource('marked_by', this.mmj_1);
    this.xnh_1 = new StringResource('peers', this.mmj_1);
    this.ynh_1 = new StringResource('peers_to_review', this.mmj_1);
    this.znh_1 = new StringResource('file_type', this.mmj_1);
    this.ani_1 = new StringResource('file_type_chosen', this.mmj_1);
    this.bni_1 = new StringResource('file_type_any', this.mmj_1);
    this.cni_1 = new StringResource('file_document', this.mmj_1);
    this.dni_1 = new StringResource('file_image', this.mmj_1);
    this.eni_1 = new StringResource('submit_grade', this.mmj_1);
    this.fni_1 = new StringResource('submit_grade_and_mark_next', this.mmj_1);
    this.gni_1 = new StringResource('graded', this.mmj_1);
    this.hni_1 = new StringResource('score_greater_than_zero', this.mmj_1);
    this.ini_1 = new StringResource('words', this.mmj_1);
    this.jni_1 = new StringResource('characters', this.mmj_1);
    this.kni_1 = new StringResource('class_timezone_set', this.mmj_1);
    this.lni_1 = new StringResource('maximum_points', this.mmj_1);
    this.mni_1 = new StringResource('penalty_label', this.mmj_1);
    this.nni_1 = new StringResource('submissions', this.mmj_1);
    this.oni_1 = new StringResource('add_text', this.mmj_1);
    this.pni_1 = new StringResource('course_blocks', this.mmj_1);
    this.qni_1 = new StringResource('add_block', this.mmj_1);
    this.rni_1 = new StringResource('edit_block', this.mmj_1);
    this.sni_1 = new StringResource('module', this.mmj_1);
    this.tni_1 = new StringResource('course_module', this.mmj_1);
    this.uni_1 = new StringResource('formatted_text_to_show_to_course_participants', this.mmj_1);
    this.vni_1 = new StringResource('add_course_block_content_desc', this.mmj_1);
    this.wni_1 = new StringResource('add_assignment_block_content_desc', this.mmj_1);
    this.xni_1 = new StringResource('discussion_board', this.mmj_1);
    this.yni_1 = new StringResource('add_discussion_board_desc', this.mmj_1);
    this.zni_1 = new StringResource('new_module', this.mmj_1);
    this.anj_1 = new StringResource('edit_module', this.mmj_1);
    this.bnj_1 = new StringResource('indent', this.mmj_1);
    this.cnj_1 = new StringResource('unindent', this.mmj_1);
    this.dnj_1 = new StringResource('institution', this.mmj_1);
    this.enj_1 = new StringResource('student_enrolment_policy', this.mmj_1);
    this.fnj_1 = new StringResource('teacher_enrolment_policy', this.mmj_1);
    this.gnj_1 = new StringResource('open_enrolment', this.mmj_1);
    this.hnj_1 = new StringResource('enrolment_requests_must_be_approved', this.mmj_1);
    this.inj_1 = new StringResource('accept_enrolment_requests_automatically', this.mmj_1);
    this.jnj_1 = new StringResource('visibility', this.mmj_1);
    this.knj_1 = new StringResource('hidden_enrolment_via_links_code_or_invitation', this.mmj_1);
    this.lnj_1 = new StringResource('visible_for_all', this.mmj_1);
    this.mnj_1 = new StringResource('terminology', this.mmj_1);
    this.nnj_1 = new StringResource('select_terminology', this.mmj_1);
    this.onj_1 = new StringResource('add_new_terminology', this.mmj_1);
    this.pnj_1 = new StringResource('edit_terminology', this.mmj_1);
    this.qnj_1 = new StringResource('your_words_for', this.mmj_1);
    this.rnj_1 = new StringResource('course_setup', this.mmj_1);
    this.snj_1 = new StringResource('number_of_groups', this.mmj_1);
    this.tnj_1 = new StringResource('assign_to_random_groups', this.mmj_1);
    this.unj_1 = new StringResource('add_new_groups', this.mmj_1);
    this.vnj_1 = new StringResource('edit_groups', this.mmj_1);
    this.wnj_1 = new StringResource('num_replies', this.mmj_1);
    this.xnj_1 = new StringResource('topics', this.mmj_1);
    this.ynj_1 = new StringResource('add_topic', this.mmj_1);
    this.znj_1 = new StringResource('add_a_reply', this.mmj_1);
    this.ank_1 = new StringResource('messages', this.mmj_1);
    this.bnk_1 = new StringResource('message', this.mmj_1);
    this.cnk_1 = new StringResource('library', this.mmj_1);
    this.dnk_1 = new StringResource('courses', this.mmj_1);
    this.enk_1 = new StringResource('course', this.mmj_1);
    this.fnk_1 = new StringResource('reports_and_analytics', this.mmj_1);
    this.gnk_1 = new StringResource('course_comments', this.mmj_1);
    this.hnk_1 = new StringResource('currently_enroled', this.mmj_1);
    this.ink_1 = new StringResource('past_enrolments', this.mmj_1);
    this.jnk_1 = new StringResource('standard', this.mmj_1);
    this.knk_1 = new StringResource('group_number', this.mmj_1);
    this.lnk_1 = new StringResource('add_group', this.mmj_1);
    this.mnk_1 = new StringResource('edit_group', this.mmj_1);
    this.nnk_1 = new StringResource('new_group_set', this.mmj_1);
    this.onk_1 = new StringResource('edit_text', this.mmj_1);
    this.pnk_1 = new StringResource('add_module', this.mmj_1);
    this.qnk_1 = new StringResource('add_a_new_course', this.mmj_1);
    this.rnk_1 = new StringResource('join_existing_course', this.mmj_1);
    this.snk_1 = new StringResource('edit_course', this.mmj_1);
    this.tnk_1 = new StringResource('currently_enrolled', this.mmj_1);
    this.unk_1 = new StringResource('past_enrollments', this.mmj_1);
    this.vnk_1 = new StringResource('unread', this.mmj_1);
    this.wnk_1 = new StringResource('new_chat', this.mmj_1);
    this.xnk_1 = new StringResource('new_group', this.mmj_1);
    this.ynk_1 = new StringResource('chat', this.mmj_1);
    this.znk_1 = new StringResource('you', this.mmj_1);
    this.anl_1 = new StringResource('edit_topic', this.mmj_1);
    this.bnl_1 = new StringResource('posts', this.mmj_1);
    this.cnl_1 = new StringResource('post', this.mmj_1);
    this.dnl_1 = new StringResource('individual_submission', this.mmj_1);
    this.enl_1 = new StringResource('unassigned', this.mmj_1);
    this.fnl_1 = new StringResource('error_too_long_text', this.mmj_1);
    this.gnl_1 = new StringResource('managed_enrolment', this.mmj_1);
    this.hnl_1 = new StringResource('text_file_submission_error', this.mmj_1);
    this.inl_1 = new StringResource('submit_all_at_once_submission_policy', this.mmj_1);
    this.jnl_1 = new StringResource('multiple_submission_allowed_submission_policy', this.mmj_1);
    this.knl_1 = new StringResource('enrolment_policy', this.mmj_1);
    this.lnl_1 = new StringResource('submission_policy', this.mmj_1);
    this.mnl_1 = new StringResource('submission_already_made', this.mmj_1);
    this.nnl_1 = new StringResource('grade_out_of_range', this.mmj_1);
    this.onl_1 = new StringResource('update_grade', this.mmj_1);
    this.pnl_1 = new StringResource('update_grade_and_mark_next', this.mmj_1);
    this.qnl_1 = new StringResource('add_discussion', this.mmj_1);
    this.rnl_1 = new StringResource('edit_discussion', this.mmj_1);
    this.snl_1 = new StringResource('type_here', this.mmj_1);
    this.tnl_1 = new StringResource('deadline_has_passed', this.mmj_1);
    this.unl_1 = new StringResource('already_submitted', this.mmj_1);
    this.vnl_1 = new StringResource('exceeds_word_limit', this.mmj_1);
    this.wnl_1 = new StringResource('exceeds_char_limit', this.mmj_1);
    this.xnl_1 = new StringResource('unassigned_error', this.mmj_1);
    this.ynl_1 = new StringResource('enabled', this.mmj_1);
    this.znl_1 = new StringResource('disabled', this.mmj_1);
    this.anm_1 = new StringResource('from_my_courses', this.mmj_1);
    this.bnm_1 = new StringResource('assign_reviewers', this.mmj_1);
    this.cnm_1 = new StringResource('reviews_per_user_group', this.mmj_1);
    this.dnm_1 = new StringResource('assign_random_reviewers', this.mmj_1);
    this.enm_1 = new StringResource('reviewer', this.mmj_1);
    this.fnm_1 = new StringResource('app_language', this.mmj_1);
    this.gnm_1 = new StringResource('pdf', this.mmj_1);
    this.hnm_1 = new StringResource('panic_button_app', this.mmj_1);
    this.inm_1 = new StringResource('actions_to_be_taken_in_case_of_emergency', this.mmj_1);
    this.jnm_1 = new StringResource('exit_app', this.mmj_1);
    this.knm_1 = new StringResource('delete_app_data_from_device', this.mmj_1);
    this.lnm_1 = new StringResource('more_options', this.mmj_1);
    this.mnm_1 = new StringResource('num_holidays', this.mmj_1);
    this.nnm_1 = new StringResource('hide_app', this.mmj_1);
    this.onm_1 = new StringResource('panic_button_explanation', this.mmj_1);
    this.pnm_1 = new StringResource('hide_app_explanation', this.mmj_1);
    this.qnm_1 = new StringResource('most_recent', this.mmj_1);
    this.rnm_1 = new StringResource('comment', this.mmj_1);
    this.snm_1 = new StringResource('grant_app_permission', this.mmj_1);
    this.tnm_1 = new StringResource('this_app_will_receive', this.mmj_1);
    this.unm_1 = new StringResource('my_profile', this.mmj_1);
    this.vnm_1 = new StringResource('add_another_account', this.mmj_1);
    this.wnm_1 = new StringResource('end_is_before_start', this.mmj_1);
    this.xnm_1 = new StringResource('select_person', this.mmj_1);
    this.ynm_1 = new StringResource('your_submission', this.mmj_1);
    this.znm_1 = new StringResource('edit_content', this.mmj_1);
    this.ann_1 = new StringResource('edit_folder', this.mmj_1);
    this.bnn_1 = new StringResource('add_new_post', this.mmj_1);
    this.cnn_1 = new StringResource('grades_scoring', this.mmj_1);
    this.dnn_1 = new StringResource('mark_comment', this.mmj_1);
    this.enn_1 = new StringResource('mark', this.mmj_1);
    this.fnn_1 = new StringResource('too_high', this.mmj_1);
    this.gnn_1 = new StringResource('required', this.mmj_1);
    this.hnn_1 = new StringResource('expand', this.mmj_1);
    this.inn_1 = new StringResource('collapse', this.mmj_1);
    this.jnn_1 = new StringResource('remove', this.mmj_1);
    this.knn_1 = new StringResource('table_of_contents', this.mmj_1);
    this.lnn_1 = new StringResource('select_date', this.mmj_1);
    this.mnn_1 = new StringResource('link', this.mmj_1);
    this.nnn_1 = new StringResource('time_submitted', this.mmj_1);
    this.onn_1 = new StringResource('group_assignment', this.mmj_1);
    this.pnn_1 = new StringResource('menu', this.mmj_1);
    this.qnn_1 = new StringResource('restarting', this.mmj_1);
    this.rnn_1 = new StringResource('terms_required_if_registration_enabled', this.mmj_1);
    this.snn_1 = new StringResource('drop_files_to_import', this.mmj_1);
    this.tnn_1 = new StringResource('compose_post', this.mmj_1);
    this.unn_1 = new StringResource('password_updated', this.mmj_1);
    this.vnn_1 = new StringResource('html5_content_display_engine', this.mmj_1);
    this.wnn_1 = new StringResource('chrome_recommended', this.mmj_1);
    this.xnn_1 = new StringResource('chrome_recommended_info', this.mmj_1);
    this.ynn_1 = new StringResource('internal_webview', this.mmj_1);
    this.znn_1 = new StringResource('internal_webview_info', this.mmj_1);
    this.ano_1 = new StringResource('content_not_ready_try_later', this.mmj_1);
    this.bno_1 = new StringResource('version', this.mmj_1);
    this.cno_1 = new StringResource('licenses', this.mmj_1);
    this.dno_1 = new StringResource('cannot_record_attendance_for_future_date_time', this.mmj_1);
    this.eno_1 = new StringResource('could_not_load_vlc', this.mmj_1);
    this.fno_1 = new StringResource('selected', this.mmj_1);
    this.gno_1 = new StringResource('clear_selection', this.mmj_1);
    this.hno_1 = new StringResource('move_entries_to_this_folder', this.mmj_1);
    this.ino_1 = new StringResource('cannot_move_to_subfolder_of_self', this.mmj_1);
    this.jno_1 = new StringResource('cannot_move_already_in_same_folder', this.mmj_1);
    this.kno_1 = new StringResource('move_to', this.mmj_1);
    this.lno_1 = new StringResource('restore', this.mmj_1);
    this.mno_1 = new StringResource('delete_permanently', this.mmj_1);
    this.nno_1 = new StringResource('deleted_items', this.mmj_1);
    this.ono_1 = new StringResource('delete_or_restore_items', this.mmj_1);
    this.pno_1 = new StringResource('yesterday', this.mmj_1);
    this.qno_1 = new StringResource('request_to_enrol_already_pending', this.mmj_1);
    this.rno_1 = new StringResource('request_submitted', this.mmj_1);
    this.sno_1 = new StringResource('canceled_enrolment_request', this.mmj_1);
    this.tno_1 = new StringResource('enroled_into_name', this.mmj_1);
    this.uno_1 = new StringResource('declined_request_from_name', this.mmj_1);
    this.vno_1 = new StringResource('view_course', this.mmj_1);
    this.wno_1 = new StringResource('moderate', this.mmj_1);
    this.xno_1 = new StringResource('manage_student_enrolments', this.mmj_1);
    this.yno_1 = new StringResource('manage_teacher_enrolments', this.mmj_1);
    this.zno_1 = new StringResource('view_learning_records', this.mmj_1);
    this.anp_1 = new StringResource('edit_learning_records', this.mmj_1);
    this.bnp_1 = new StringResource('view_members', this.mmj_1);
    this.cnp_1 = new StringResource('copy_invite_code', this.mmj_1);
    this.dnp_1 = new StringResource('direct_enrol_users_onto_courses', this.mmj_1);
    this.enp_1 = new StringResource('could_not_restart', this.mmj_1);
    this.fnp_1 = new StringResource('close_now', this.mmj_1);
    this.gnp_1 = new StringResource('view_all_courses', this.mmj_1);
    this.hnp_1 = new StringResource('edit_all_courses', this.mmj_1);
    this.inp_1 = new StringResource('moderate_all_courses', this.mmj_1);
    this.jnp_1 = new StringResource('manage_student_enrolments_for_all_courses', this.mmj_1);
    this.knp_1 = new StringResource('manage_teacher_enrolments_for_all_courses', this.mmj_1);
    this.lnp_1 = new StringResource('view_attendance_records_for_all_courses', this.mmj_1);
    this.mnp_1 = new StringResource('edit_attendance_records_for_all_courses', this.mmj_1);
    this.nnp_1 = new StringResource('add_new_users', this.mmj_1);
    this.onp_1 = new StringResource('view_all_users', this.mmj_1);
    this.pnp_1 = new StringResource('edit_all_users', this.mmj_1);
    this.qnp_1 = new StringResource('view_learning_records_for_all_courses', this.mmj_1);
    this.rnp_1 = new StringResource('edit_learning_records_for_all_courses', this.mmj_1);
    this.snp_1 = new StringResource('add_new_courses', this.mmj_1);
    this.tnp_1 = new StringResource('manage_user_permissions', this.mmj_1);
    this.unp_1 = new StringResource('reset_passwords', this.mmj_1);
    this.vnp_1 = new StringResource('upload_failed', this.mmj_1);
    this.wnp_1 = new StringResource('opening_name', this.mmj_1);
    this.xnp_1 = new StringResource('invalid_invite_code', this.mmj_1);
    this.ynp_1 = new StringResource('bulk_import', this.mmj_1);
    this.znp_1 = new StringResource('import_key', this.mmj_1);
    this.anq_1 = new StringResource('imported', this.mmj_1);
    this.bnq_1 = new StringResource('you_can_import_users_using_a_csv_file', this.mmj_1);
    this.cnq_1 = new StringResource('get_template', this.mmj_1);
    this.dnq_1 = new StringResource('line_number', this.mmj_1);
    this.enq_1 = new StringResource('selected_content', this.mmj_1);
    this.fnq_1 = new StringResource('edit_content_block', this.mmj_1);
    this.gnq_1 = new StringResource('compression', this.mmj_1);
    this.hnq_1 = new StringResource('compression_highest', this.mmj_1);
    this.inq_1 = new StringResource('compression_high', this.mmj_1);
    this.jnq_1 = new StringResource('compression_medium', this.mmj_1);
    this.knq_1 = new StringResource('compression_low', this.mmj_1);
    this.lnq_1 = new StringResource('compression_lowest', this.mmj_1);
    this.mnq_1 = new StringResource('compression_none', this.mmj_1);
    this.nnq_1 = new StringResource('size_compressed_was', this.mmj_1);
    this.onq_1 = new StringResource('size', this.mmj_1);
    this.pnq_1 = new StringResource('import_error', this.mmj_1);
    this.qnq_1 = new StringResource('upload_error', this.mmj_1);
    this.rnq_1 = new StringResource('offline_items_storage', this.mmj_1);
    this.snq_1 = new StringResource('space_available', this.mmj_1);
    this.tnq_1 = new StringResource('grant_permission', this.mmj_1);
    this.unq_1 = new StringResource('gradebook', this.mmj_1);
    this.vnq_1 = new StringResource('full_screen', this.mmj_1);
    this.wnq_1 = new StringResource('exit_full_screen', this.mmj_1);
    this.xnq_1 = new StringResource('increase_text_size', this.mmj_1);
    this.ynq_1 = new StringResource('decrease_text_size', this.mmj_1);
    this.znq_1 = new StringResource('nothing_here_yet', this.mmj_1);
    this.anr_1 = new StringResource('signup_with_passkey', this.mmj_1);
    this.bnr_1 = new StringResource('other_options', this.mmj_1);
    this.cnr_1 = new StringResource('i_am_teacher', this.mmj_1);
    this.dnr_1 = new StringResource('i_am_parent', this.mmj_1);
    this.enr_1 = new StringResource('select_picture_from_files', this.mmj_1);
    this.fnr_1 = new StringResource('your_date_of_birth', this.mmj_1);
    this.gnr_1 = new StringResource('add_child_profile', this.mmj_1);
    this.hnr_1 = new StringResource('child_profiles', this.mmj_1);
    this.inr_1 = new StringResource('finish', this.mmj_1);
    this.jnr_1 = new StringResource('scan_badge_qr_code', this.mmj_1);
    this.knr_1 = new StringResource('new_user', this.mmj_1);
    this.lnr_1 = new StringResource('existing_user', this.mmj_1);
    this.mnr_1 = new StringResource('personal_account', this.mmj_1);
    this.nnr_1 = new StringResource('signup', this.mmj_1);
    this.onr_1 = new StringResource('access_educational_content_download_offline', this.mmj_1);
    this.pnr_1 = new StringResource('join_learning_space', this.mmj_1);
    this.qnr_1 = new StringResource('learning_space', this.mmj_1);
    this.rnr_1 = new StringResource('eg_for_your_school_organization', this.mmj_1);
    this.snr_1 = new StringResource('new_learning_space', this.mmj_1);
    this.tnr_1 = new StringResource('full_name', this.mmj_1);
    this.unr_1 = new StringResource('which_profile_do_you_want_to_start', this.mmj_1);
    this.vnr_1 = new StringResource('create_passkey_for_faster_and_easier_signin', this.mmj_1);
    this.wnr_1 = new StringResource('create_username_and_password', this.mmj_1);
    this.xnr_1 = new StringResource('create_local_account', this.mmj_1);
    this.ynr_1 = new StringResource('with_passkeys_no_complex_passwords_needed', this.mmj_1);
    this.znr_1 = new StringResource('enter_link_manually', this.mmj_1);
    this.ans_1 = new StringResource('registration_not_allowed', this.mmj_1);
    this.bns_1 = new StringResource('add_subtitles', this.mmj_1);
    this.cns_1 = new StringResource('edit_subtitles', this.mmj_1);
    this.dns_1 = new StringResource('subtitles', this.mmj_1);
    this.ens_1 = new StringResource('progress_key', this.mmj_1);
    this.fns_1 = new StringResource('response', this.mmj_1);
    this.gns_1 = new StringResource('true_key', this.mmj_1);
    this.hns_1 = new StringResource('false_key', this.mmj_1);
    this.ins_1 = new StringResource('copy', this.mmj_1);
    this.jns_1 = new StringResource('copy_course', this.mmj_1);
    this.kns_1 = new StringResource('copy_of', this.mmj_1);
    this.lns_1 = new StringResource('invite_via_contact', this.mmj_1);
    this.mns_1 = new StringResource('invite_to_course', this.mmj_1);
    this.nns_1 = new StringResource('use_email', this.mmj_1);
    this.ons_1 = new StringResource('use_phone_number', this.mmj_1);
    this.pns_1 = new StringResource('add_username_email_phone', this.mmj_1);
    this.qns_1 = new StringResource('no_valid_contact_found', this.mmj_1);
    this.rns_1 = new StringResource('no_contact_found', this.mmj_1);
    this.sns_1 = new StringResource('decline', this.mmj_1);
    this.tns_1 = new StringResource('do_you_want_to_join_this_course', this.mmj_1);
    this.uns_1 = new StringResource('invite_has_been_used', this.mmj_1);
    this.vns_1 = new StringResource('pending_invites', this.mmj_1);
    this.wns_1 = new StringResource('expires', this.mmj_1);
    this.xns_1 = new StringResource('reminder', this.mmj_1);
    this.yns_1 = new StringResource('resend', this.mmj_1);
    this.zns_1 = new StringResource('revoke', this.mmj_1);
    this.ant_1 = new StringResource('invite_code_redeemed', this.mmj_1);
    this.bnt_1 = new StringResource('invite_code_invalid', this.mmj_1);
    this.cnt_1 = new StringResource('invite_declined', this.mmj_1);
    this.dnt_1 = new StringResource('invite_code_already_redeemed', this.mmj_1);
    this.ent_1 = new StringResource('invite_code_expired', this.mmj_1);
    this.fnt_1 = new StringResource('invitation_is_revoked', this.mmj_1);
    this.gnt_1 = new StringResource('security', this.mmj_1);
    this.hnt_1 = new StringResource('manage_account', this.mmj_1);
    this.int_1 = new StringResource('passkeys', this.mmj_1);
    this.jnt_1 = new StringResource('manage', this.mmj_1);
    this.knt_1 = new StringResource('created', this.mmj_1);
    this.lnt_1 = new StringResource('create_passkey', this.mmj_1);
    this.mnt_1 = new StringResource('last_updated', this.mmj_1);
    this.nnt_1 = new StringResource('delete_this_passkey', this.mmj_1);
    this.ont_1 = new StringResource('loss_access_passkey_dialog', this.mmj_1);
    this.pnt_1 = new StringResource('sign_in_faster_next_time', this.mmj_1);
    this.qnt_1 = new StringResource('secure_passkey_detail_text', this.mmj_1);
    this.rnt_1 = new StringResource('invitations_sent', this.mmj_1);
    this.snt_1 = new StringResource('parent_email', this.mmj_1);
    this.tnt_1 = new StringResource('wait_for_parent_to_consent', this.mmj_1);
    this.unt_1 = new StringResource('wait_for_parent', this.mmj_1);
    this.vnt_1 = new StringResource('policy', this.mmj_1);
    this.wnt_1 = new StringResource('your_profile', this.mmj_1);
    this.xnt_1 = new StringResource('invitation_sent', this.mmj_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.ynt_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.znt_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.anu_1 = new Impl(this.znt_1, this.ynt_1);
    this.bnu_1 = new PluralsResource('number_of_attempts', this.anu_1);
    this.cnu_1 = new PluralsResource('duration_hours', this.anu_1);
    this.dnu_1 = new PluralsResource('duration_minutes', this.anu_1);
    this.enu_1 = new PluralsResource('duration_seconds', this.anu_1);
    this.fnu_1 = new PluralsResource('items_selected', this.anu_1);
    this.gnu_1 = new PluralsResource('items_deleted', this.anu_1);
    this.hnu_1 = new PluralsResource('items_restored', this.anu_1);
    this.inu_1 = new PluralsResource('are_you_sure_you_want_to_permanently_delete', this.anu_1);
  }
  var plurals_instance;
  function plurals_getInstance() {
    if (plurals_instance == null)
      new plurals();
    return plurals_instance;
  }
  function MR() {
    MR_instance = this;
    this.jnu_1 = '3c2f2de18b39e423b26ae1efe58963da';
    this.knu_1 = strings_getInstance().mmj_1.ume(plurals_getInstance().anu_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.lnu_1 = makeAccountActive;
    this.mnu_1 = parentJoin;
  }
  protoOf(AccountRegisterOptions).toString = function () {
    return 'AccountRegisterOptions(makeAccountActive=' + this.lnu_1 + ', parentJoin=' + this.mnu_1 + ')';
  };
  protoOf(AccountRegisterOptions).hashCode = function () {
    var result = getBooleanHashCode(this.lnu_1);
    result = imul(result, 31) + (this.mnu_1 == null ? 0 : this.mnu_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.lnu_1 === tmp0_other_with_cast.lnu_1))
      return false;
    if (!equals(this.mnu_1, tmp0_other_with_cast.mnu_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.pnu_1;
    dataLayer$factory_0();
    return this_0.t2();
  }
  function $setAuthCOROUTINE$1(_this__u8e3s4, personUid, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ynu_1 = _this__u8e3s4;
    this.znu_1 = personUid;
    this.anv_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.ynu_1, this.anv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.bnv_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = _get_dataLayer__43yv12(this.ynu_1).bk4().a7f();
            var this_0 = new PersonAuth2();
            this_0.cg0_1 = this.znu_1;
            var tmp_1 = this_0;
            tmp_1.dg0_1 = 'PBKDF2x2';
            this_0.eg0_1 = this.bnv_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.nnu_1 = learningSpace;
    this.onu_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.nnu_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.pnu_1 = Instance(this_0, tmp$ret$3, null).a5d(this, dataLayer$factory());
  }
  protoOf(AuthManager).a57 = function () {
    return this.onu_1;
  };
  protoOf(AuthManager).cnv = 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 ConsentRequestToParentUseCaseSendToServerImpl$invoke$lambda() {
    return 'SendConsentRequestToParentUseCase: sent OK';
  }
  function ConsentRequestToParentUseCaseSendToServerImpl$invoke$lambda_0($e) {
    return function () {
      return 'SendConsentRequestToParentUseCase:-  exception ' + $e;
    };
  }
  function $invokeCOROUTINE$2(_this__u8e3s4, request, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lnv_1 = _this__u8e3s4;
    this.mnv_1 = request;
  }
  protoOf($invokeCOROUTINE$2).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.nnv_1 = this.lnv_1.unv_1;
            var tmp_1 = this;
            tmp_1.onv_1 = this.lnv_1.vnv_1.xnv_1 + 'api/account/sendcensentrequest';
            var tmp_2 = this;
            tmp_2.pnv_1 = this.nnv_1;
            var tmp_3 = this;
            tmp_3.qnv_1 = this.pnv_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.onv_1);
            contentType(this_0, Application_getInstance().v2r_1);
            setBodyJson(this_0, this.lnv_1.wnv_1, Companion_instance_51.n4r(), this.mnv_1);
            tmp_4.rnv_1 = this_0;
            this.rnv_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_5 = this;
            tmp_5.snv_1 = this.qnv_1;
            var tmp_6 = this;
            tmp_6.tnv_1 = this.rnv_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.tnv_1, this.snv_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_7 = Napier_getInstance();
            tmp_7.k5e(VOID, VOID, ConsentRequestToParentUseCaseSendToServerImpl$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, ConsentRequestToParentUseCaseSendToServerImpl$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 ConsentRequestToParentUseCaseSendToServerImpl(httpClient, learningSpace, json) {
    this.unv_1 = httpClient;
    this.vnv_1 = learningSpace;
    this.wnv_1 = json;
  }
  protoOf(ConsentRequestToParentUseCaseSendToServerImpl).znv = function (request, $completion) {
    var tmp = new $invokeCOROUTINE$2(this, request, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  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.anw_1 = tmp0_serialDesc;
  }
  protoOf($serializer).q44 = function () {
    return this.anw_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.anw_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).bnw = function (encoder, value) {
    var tmp0_desc = this.anw_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.xnv_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer).r44 = function (encoder, value) {
    return this.bnw(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().anw_1);
    }
    $this.xnv_1 = url;
    var tmp = $this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.ynv_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.xnv_1).y30_1, '.local');
    };
  }
  function LearningSpace$_init_$lambda_beny7x(this$0) {
    return function () {
      return endsWith(Url(this$0.xnv_1).y30_1, '.local');
    };
  }
  function LearningSpace(url) {
    this.xnv_1 = url;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.ynv_1 = lazy(tmp_0, LearningSpace$isLocal$delegate$lambda(this));
  }
  protoOf(LearningSpace).cnw = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.ynv_1;
    isLocal$factory();
    return this_0.t2();
  };
  protoOf(LearningSpace).toString = function () {
    return 'LearningSpace(url=' + this.xnv_1 + ')';
  };
  protoOf(LearningSpace).hashCode = function () {
    return getStringHashCode(this.xnv_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.xnv_1 === tmp0_other_with_cast.xnv_1))
      return false;
    return true;
  };
  function isLocal$factory() {
    return getPropertyCallableRef('isLocal', 1, KProperty1, function (receiver) {
      return receiver.cnw();
    }, null);
  }
  function Companion_0() {
    Companion_instance_49 = this;
    this.dnw_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.enw_1 = LinkedHashMap_init_$Create$();
  }
  protoOf(LearningSpaceScope).fnw = function (context) {
    // Inline function 'kotlin.collections.getOrPut' call
    var this_0 = this.enw_1;
    var key = context.xnv_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.fnw(context instanceof LearningSpace ? context : THROW_CCE());
  };
  function Pbkdf2Params(iterations, keyLength) {
    iterations = iterations === VOID ? 10000 : iterations;
    keyLength = keyLength === VOID ? 512 : keyLength;
    this.gnw_1 = iterations;
    this.hnw_1 = keyLength;
  }
  protoOf(Pbkdf2Params).toString = function () {
    return 'Pbkdf2Params(iterations=' + this.gnw_1 + ', keyLength=' + this.hnw_1 + ')';
  };
  protoOf(Pbkdf2Params).hashCode = function () {
    var result = this.gnw_1;
    result = imul(result, 31) + this.hnw_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.gnw_1 === tmp0_other_with_cast.gnw_1))
      return false;
    if (!(this.hnw_1 === tmp0_other_with_cast.hnw_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.inw_1 = tmp0_serialDesc;
  }
  protoOf($serializer_0).q44 = function () {
    return this.inw_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.inw_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).jnw = function (encoder, value) {
    var tmp0_desc = this.inw_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance(), value.knw_1);
    tmp1_output.w49(tmp0_desc, 1, value.lnw_1);
    tmp1_output.a4a(tmp0_desc, 2, $serializer_getInstance_0(), value.mnw_1);
    tmp1_output.w49(tmp0_desc, 3, value.nnw_1);
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.onw_1 === 'en')) {
      tmp1_output.w49(tmp0_desc, 4, value.onw_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_0).r44 = function (encoder, value) {
    return this.jnw(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().inw_1);
    }
    $this.knw_1 = person;
    $this.lnw_1 = newPassword;
    $this.mnw_1 = parent;
    $this.nnw_1 = learningSpaceUrl;
    if (0 === (seen1 & 16))
      $this.onw_1 = 'en';
    else
      $this.onw_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.knw_1 = person;
    this.lnw_1 = newPassword;
    this.mnw_1 = parent;
    this.nnw_1 = learningSpaceUrl;
    this.onw_1 = langCode;
  }
  protoOf(RegisterRequest).toString = function () {
    return 'RegisterRequest(person=' + this.knw_1 + ', newPassword=' + this.lnw_1 + ', parent=' + this.mnw_1 + ', learningSpaceUrl=' + this.nnw_1 + ', langCode=' + this.onw_1 + ')';
  };
  protoOf(RegisterRequest).hashCode = function () {
    var result = this.knw_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.lnw_1) | 0;
    result = imul(result, 31) + (this.mnw_1 == null ? 0 : this.mnw_1.hashCode()) | 0;
    result = imul(result, 31) + getStringHashCode(this.nnw_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.onw_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.knw_1.equals(tmp0_other_with_cast.knw_1))
      return false;
    if (!(this.lnw_1 === tmp0_other_with_cast.lnw_1))
      return false;
    if (!equals(this.mnw_1, tmp0_other_with_cast.mnw_1))
      return false;
    if (!(this.nnw_1 === tmp0_other_with_cast.nnw_1))
      return false;
    if (!(this.onw_1 === tmp0_other_with_cast.onw_1))
      return false;
    return true;
  };
  function Companion_2() {
  }
  protoOf(Companion_2).n4r = function () {
    return $serializer_getInstance_13();
  };
  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.SendConsentRequestToParentUseCase.SendConsentRequestToParentRequest', this, 5);
    tmp0_serialDesc.t4f('childFullName', false);
    tmp0_serialDesc.t4f('childDateOfBirth', false);
    tmp0_serialDesc.t4f('childGender', false);
    tmp0_serialDesc.t4f('parentContact', false);
    tmp0_serialDesc.t4f('ppjUid', false);
    this.pnw_1 = tmp0_serialDesc;
  }
  protoOf($serializer_1).q44 = function () {
    return this.pnw_1;
  };
  protoOf($serializer_1).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), LongSerializer_getInstance(), IntSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_1).s44 = function (decoder) {
    var tmp0_desc = this.pnw_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 = 0;
    var tmp7_local3 = null;
    var tmp8_local4 = new Long(0, 0);
    var tmp9_input = decoder.i48(tmp0_desc);
    if (tmp9_input.x48()) {
      tmp4_local0 = tmp9_input.s48(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.n48(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.o48(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.s48(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.n48(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.o48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.j48(tmp0_desc);
    return SendConsentRequestToParentRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_1).qnw = function (encoder, value) {
    var tmp0_desc = this.pnw_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.rnw_1);
    tmp1_output.s49(tmp0_desc, 1, value.snw_1);
    tmp1_output.r49(tmp0_desc, 2, value.tnw_1);
    tmp1_output.w49(tmp0_desc, 3, value.unw_1);
    tmp1_output.s49(tmp0_desc, 4, value.vnw_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_1).r44 = function (encoder, value) {
    return this.qnw(encoder, value instanceof SendConsentRequestToParentRequest ? value : THROW_CCE());
  };
  var $serializer_instance_1;
  function $serializer_getInstance_13() {
    if ($serializer_instance_1 == null)
      new $serializer_1();
    return $serializer_instance_1;
  }
  function SendConsentRequestToParentRequest_init_$Init$(seen1, childFullName, childDateOfBirth, childGender, parentContact, ppjUid, serializationConstructorMarker, $this) {
    if (!(31 === (31 & seen1))) {
      throwMissingFieldException(seen1, 31, $serializer_getInstance_13().pnw_1);
    }
    $this.rnw_1 = childFullName;
    $this.snw_1 = childDateOfBirth;
    $this.tnw_1 = childGender;
    $this.unw_1 = parentContact;
    $this.vnw_1 = ppjUid;
    return $this;
  }
  function SendConsentRequestToParentRequest_init_$Create$(seen1, childFullName, childDateOfBirth, childGender, parentContact, ppjUid, serializationConstructorMarker) {
    return SendConsentRequestToParentRequest_init_$Init$(seen1, childFullName, childDateOfBirth, childGender, parentContact, ppjUid, serializationConstructorMarker, objectCreate(protoOf(SendConsentRequestToParentRequest)));
  }
  function SendConsentRequestToParentRequest(childFullName, childDateOfBirth, childGender, parentContact, ppjUid) {
    this.rnw_1 = childFullName;
    this.snw_1 = childDateOfBirth;
    this.tnw_1 = childGender;
    this.unw_1 = parentContact;
    this.vnw_1 = ppjUid;
  }
  protoOf(SendConsentRequestToParentRequest).toString = function () {
    return 'SendConsentRequestToParentRequest(childFullName=' + this.rnw_1 + ', childDateOfBirth=' + this.snw_1.toString() + ', childGender=' + this.tnw_1 + ', parentContact=' + this.unw_1 + ', ppjUid=' + this.vnw_1.toString() + ')';
  };
  protoOf(SendConsentRequestToParentRequest).hashCode = function () {
    var result = getStringHashCode(this.rnw_1);
    result = imul(result, 31) + this.snw_1.hashCode() | 0;
    result = imul(result, 31) + this.tnw_1 | 0;
    result = imul(result, 31) + getStringHashCode(this.unw_1) | 0;
    result = imul(result, 31) + this.vnw_1.hashCode() | 0;
    return result;
  };
  protoOf(SendConsentRequestToParentRequest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SendConsentRequestToParentRequest))
      return false;
    var tmp0_other_with_cast = other instanceof SendConsentRequestToParentRequest ? other : THROW_CCE();
    if (!(this.rnw_1 === tmp0_other_with_cast.rnw_1))
      return false;
    if (!this.snw_1.equals(tmp0_other_with_cast.snw_1))
      return false;
    if (!(this.tnw_1 === tmp0_other_with_cast.tnw_1))
      return false;
    if (!(this.unw_1 === tmp0_other_with_cast.unw_1))
      return false;
    if (!this.vnw_1.equals(tmp0_other_with_cast.vnw_1))
      return false;
    return true;
  };
  function SendConsentRequestToParentUseCase() {
  }
  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_3() {
  }
  var Companion_instance_52;
  function Companion_getInstance_20() {
    return Companion_instance_52;
  }
  function $serializer_2() {
    $serializer_instance_2 = 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.wnw_1 = tmp0_serialDesc;
  }
  protoOf($serializer_2).q44 = function () {
    return this.wnw_1;
  };
  protoOf($serializer_2).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_2).s44 = function (decoder) {
    var tmp0_desc = this.wnw_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_2).xnw = function (encoder, value) {
    var tmp0_desc = this.wnw_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_1(), value.ynw_1);
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance(), value.znw_1);
    tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_11(), value.anx_1);
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.bnx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, $serializer_getInstance_2(), value.bnx_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_2).r44 = function (encoder, value) {
    return this.xnw(encoder, value instanceof UserSessionWithPersonAndLearningSpace ? value : THROW_CCE());
  };
  var $serializer_instance_2;
  function $serializer_getInstance_14() {
    if ($serializer_instance_2 == null)
      new $serializer_2();
    return $serializer_instance_2;
  }
  function UserSessionWithPersonAndLearningSpace_init_$Init$(seen1, userSession, person, learningSpace, personPicture, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_14().wnw_1);
    }
    $this.ynw_1 = userSession;
    $this.znw_1 = person;
    $this.anx_1 = learningSpace;
    if (0 === (seen1 & 8))
      $this.bnx_1 = null;
    else
      $this.bnx_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.ynw_1 = userSession;
    this.znw_1 = person;
    this.anx_1 = learningSpace;
    this.bnx_1 = personPicture;
  }
  protoOf(UserSessionWithPersonAndLearningSpace).cnx = function () {
    var displayUrl = removeSuffix(removePrefix(removePrefix(this.anx_1.xnv_1, 'http://'), 'https://'), '/');
    return '' + this.znw_1.g96_1 + '@' + displayUrl;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).dnx = function () {
    return toUmAccount(this.znw_1, this.anx_1.xnv_1);
  };
  protoOf(UserSessionWithPersonAndLearningSpace).enx = function () {
    var tmp0_elvis_lhs = this.znw_1.g96_1;
    return new XapiAgent(VOID, VOID, VOID, VOID, VOID, new XapiAccount(this.anx_1.xnv_1, tmp0_elvis_lhs == null ? 'anonymous' : tmp0_elvis_lhs));
  };
  protoOf(UserSessionWithPersonAndLearningSpace).fnx = function (userSession, person, learningSpace, personPicture) {
    return new UserSessionWithPersonAndLearningSpace(userSession, person, learningSpace, personPicture);
  };
  protoOf(UserSessionWithPersonAndLearningSpace).gnx = function (userSession, person, learningSpace, personPicture, $super) {
    userSession = userSession === VOID ? this.ynw_1 : userSession;
    person = person === VOID ? this.znw_1 : person;
    learningSpace = learningSpace === VOID ? this.anx_1 : learningSpace;
    personPicture = personPicture === VOID ? this.bnx_1 : personPicture;
    return $super === VOID ? this.fnx(userSession, person, learningSpace, personPicture) : $super.fnx.call(this, userSession, person, learningSpace, personPicture);
  };
  protoOf(UserSessionWithPersonAndLearningSpace).toString = function () {
    return 'UserSessionWithPersonAndLearningSpace(userSession=' + this.ynw_1 + ', person=' + this.znw_1 + ', learningSpace=' + this.anx_1 + ', personPicture=' + this.bnx_1 + ')';
  };
  protoOf(UserSessionWithPersonAndLearningSpace).hashCode = function () {
    var result = hashCode(this.ynw_1);
    result = imul(result, 31) + this.znw_1.hashCode() | 0;
    result = imul(result, 31) + this.anx_1.hashCode() | 0;
    result = imul(result, 31) + (this.bnx_1 == null ? 0 : this.bnx_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.ynw_1, tmp0_other_with_cast.ynw_1))
      return false;
    if (!this.znw_1.equals(tmp0_other_with_cast.znw_1))
      return false;
    if (!this.anx_1.equals(tmp0_other_with_cast.anx_1))
      return false;
    if (!equals(this.bnx_1, tmp0_other_with_cast.bnx_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.cnx();
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
    var tmp$ret$1 = b.cnx();
    return compareValues(tmp, tmp$ret$1);
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation) {
    this.pnx_1 = this$0;
    this.qnx_1 = $learningSpace;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).snx = function (learningSpaceSessions, $completion) {
    var tmp = this.tnx(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.snx((!(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.pnx_1.ynx_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.anx_1.equals(this.qnx_1)) {
                  destination.i1(element);
                }
              }
              var this_1 = this.rnx_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.lil_1;
                var tmp_0 = tmp0_elvis_lhs == null ? new UserSession() : tmp0_elvis_lhs;
                var tmp1_elvis_lhs = item.jil_1;
                destination_0.i1(new UserSessionWithPersonAndLearningSpace(tmp_0, tmp1_elvis_lhs == null ? new Person() : tmp1_elvis_lhs, this.qnx_1, item.kil_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).tnx = function (learningSpaceSessions, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this.pnx_1, this.qnx_1, completion);
    i.rnx_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.snx(learningSpaceSessions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation) {
    this.nny_1 = this$0;
    this.ony_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.nny_1.vnx_1;
            var context = this.ony_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.qny_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 1);
            this.hd_1 = 1;
            var tmp_5 = this.qny_1.b7f().eik();
            var tmp_6 = UstadAccountManager$slambda$slambda$slambda$slambda$slambda_0(this.nny_1, this.ony_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.nny_1, this.ony_1, completion);
    i.pny_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.zny_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda).bnz = function (learningSpacesWithSessions, $completion) {
    var tmp = this.cnz(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.bnz((!(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.anz_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            launch(this.zny_1.eny_1, VOID, VOID, UstadAccountManager$slambda$slambda$slambda$slambda_0(this.zny_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).cnz = function (learningSpacesWithSessions, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda(this.zny_1, completion);
    i.anz_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.bnz(learningSpacesWithSessions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda(this$0, resultContinuation) {
    this.lnz_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.lnz_1.xnx_1, UstadAccountManager$slambda$slambda$slambda_0(this.lnz_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.lnz_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.unz_1 = $session;
    this.vnz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).xnz = function (personAndPictureFromDb, $completion) {
    var tmp = this.ynz(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.xnz((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.wnz_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.hks()) === this.unz_1.znw_1.hks());
          var tmp2_safe_receiver = this.wnz_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.unz_1.bnx_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.unz_1.znw_1, UstadAccountManager$slambda$slambda$slambda$slambda$lambda(this.wnz_1));
            } else {
              tmp_1 = this.unz_1.znw_1;
            }
            var tmp_2 = tmp_1;
            var tmp_3;
            if (pictureUriChanged) {
              var tmp5_safe_receiver = this.wnz_1;
              tmp_3 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.ag6_1;
            } else {
              tmp_3 = this.unz_1.bnx_1;
            }
            this.vnz_1.znz(this.unz_1.gnx(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).ynz = function (personAndPictureFromDb, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda_1(this.unz_1, this.vnz_1, completion);
    i.wnz_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.xnz(personAndPictureFromDb, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.io0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).lo0 = function (session, $completion) {
    var tmp = this.mo0(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.lo0(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.io0_1.vnx_1;
            var context = this.jo0_1.anx_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.ko0_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 1);
            this.hd_1 = 1;
            var tmp_5 = this.ko0_1.n7d().gcl(this.jo0_1.ynw_1.bil_1);
            var tmp_6 = UstadAccountManager$slambda$slambda$slambda$slambda_2(this.jo0_1, this.io0_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).mo0 = function (session, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda_1(this.io0_1, completion);
    i.jo0_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.lo0(session, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda_1(this$0, resultContinuation) {
    this.vo0_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.vo0_1.wnx_1, UstadAccountManager$slambda$slambda$slambda_2(this.vo0_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.vo0_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.eo1_1 = $repo;
    this.fo1_1 = $person;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$registerWithPasskey$slambda$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(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.io1(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.eo1_1.n7d().mg4(this.fo1_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ho1_1 = suspendResult;
            if (this.ho1_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.eo1_1.n7d().insertAsync(this.fo1_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).jo1 = function (it, completion) {
    var i = new UstadAccountManager$registerWithPasskey$slambda$slambda(this.eo1_1, this.fo1_1, completion);
    i.go1_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda$slambda(this$0, resultContinuation) {
    this.so1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda$slambda).wo1 = 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.wo1(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.to1_1.j3b().f30_1 === 200) {
              var tmp_0 = this;
              tmp_0.vo1_1 = _get_json__d8whur(this.so1_1);
              this.hd_1 = 1;
              suspendResult = bodyAsText(this.to1_1, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.uo1_1 = new Pair(null, this.to1_1.j3b().f30_1);
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var string = suspendResult;
            var this_0 = this.vo1_1.t45();
            var this_1 = serializer(this_0, createKType(getKClass(Person), arrayOf([]), false));
            var ARGUMENT = this.vo1_1.s45(isInterface(this_1, KSerializer) ? this_1 : THROW_CCE(), string);
            this.uo1_1 = new Pair(ARGUMENT, 200);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.uo1_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.so1_1, completion);
    i.to1_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.wo1(response, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda$slambda_1($db, $registeredPerson, resultContinuation) {
    this.fo2_1 = $db;
    this.go2_1 = $registeredPerson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda$slambda_1).io1 = function (it, $completion) {
    var tmp = this.jo1(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.io1(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.fo2_1.n7d().mg4(this.go2_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.io2_1 = suspendResult;
            if (this.io2_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.fo2_1.n7d().insertAsync(this.go2_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).jo1 = function (it, completion) {
    var i = new UstadAccountManager$register$slambda$slambda_1(this.fo2_1, this.go2_1, completion);
    i.ho2_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.io1(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.znx_1;
    createNewLocalAccountUseCase$factory_0();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.any_1;
    httpClient$factory_0();
    return this_0.t2();
  }
  function _get_json__d8whur($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bny_1;
    json$factory_0();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cny_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.wik_1 = tmp_0.n62(679);
    this_0.cil_1 = get_doorWrapperNodeId(currentDb);
    this_0.dil_1 = systemTimeInMillis();
    var tmp_1 = this_0;
    tmp_1.iil_1 = 8 | 4;
    var tmp_2 = this_0;
    tmp_2.fil_1 = 1;
    var this_1 = new UserSessionWithPersonAndLearningSpace(this_0, Companion_getInstance_21().jo2_1, new LearningSpace(learningSpaceUrl));
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.makeNewTempGuestSession.<anonymous>' call
    launch($this.eny_1, VOID, VOID, UstadAccountManager$makeNewTempGuestSession$slambda_0(currentDb, this_1, null));
    return this_1;
  }
  function assertNotClosed($this) {
    if ($this.dny_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.xnx_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.xnx_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.xnx_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.xnv_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.unx_1;
    var key = 'accountmgr.endpointswithsessions';
    this_1.em9(key, json);
  }
  function getSiteFromDbOrLoadFromHttp($this, repo, $completion) {
    var tmp = new $getSiteFromDbOrLoadFromHttpCOROUTINE$8($this, repo, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_4() {
    Companion_instance_53 = 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.jo2_1 = this_0;
    this.ko2_1 = 'accountmgr.activesession';
    this.lo2_1 = 'accountmgr.activeendpoint';
    this.mo2_1 = 'accountmgr.endpointswithsessions';
    this.no2_1 = 'http://localhost/';
    this.oo2_1 = 'com.ustadmobile';
    this.po2_1 = 'com.ustadmobile.AUTH_GET_TOKEN';
  }
  var Companion_instance_53;
  function Companion_getInstance_21() {
    if (Companion_instance_53 == null)
      new Companion_4();
    return Companion_instance_53;
  }
  function sam$kotlin_Comparator$0(function_0) {
    this.co3_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0).pa = function (a, b) {
    return this.co3_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.do3_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).t1d = function (value, $completion) {
    return this.do3_1(value, $completion);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0(function_0) {
    this.eo3_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0).fo3 = function (endpointUrl) {
    return this.eo3_1(endpointUrl);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0(function_0) {
    this.go3_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0).fo3 = function (endpointUrl) {
    return this.go3_1(endpointUrl);
  };
  function UstadAccountManager$slambda(this$0, resultContinuation) {
    this.po3_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.po3_1.ynx_1, UstadAccountManager$slambda$slambda_0(this.po3_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.po3_1, completion);
    i.qo3_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.zo3_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.zo3_1.wnx_1, UstadAccountManager$slambda$slambda_2(this.zo3_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.zo3_1, completion);
    i.ao4_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.jo4_1 = $currentDb;
    this.ko4_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.jo4_1.b7f().dik(this.ko4_1.ynw_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.jo4_1, this.ko4_1, completion);
    i.lo4_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, $isMinor, resultContinuation) {
    this.uo4_1 = $learningSpaceUrl;
    this.vo4_1 = this$0;
    this.wo4_1 = $passkeyResult;
    this.xo4_1 = $person;
    this.yo4_1 = $isMinor;
    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 = 5;
            this.ao5_1 = new LearningSpace(this.uo4_1);
            var tmp_0 = this;
            var this_0 = this.vo4_1.vnx_1;
            var context = this.ao5_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.bo5_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            this.hd_1 = 1;
            suspendResult = this.bo5_1.go5(this.wo4_1, this.xo4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_5 = this;
            var this_1 = this.vo4_1.vnx_1;
            var context_0 = this.ao5_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.co5_1 = tmp_8.d58(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), null).ak4();
            this.hd_1 = 2;
            suspendResult = withDoorTransactionAsync(this.co5_1, VOID, UstadAccountManager$registerWithPasskey$slambda$slambda_0(this.co5_1, this.xo4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var this_2 = this.vo4_1.vnx_1;
            var context_1 = this.ao5_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);
            if (!this.yo4_1) {
              this.hd_1 = 3;
              suspendResult = this.vo4_1.ho5(this.xo4_1, this.uo4_1, null, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            var session = suspendResult;
            this.vo4_1.znz(session);
            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(UstadAccountManager$registerWithPasskey$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadAccountManager$registerWithPasskey$slambda(this.uo4_1, this.vo4_1, this.wo4_1, this.xo4_1, this.yo4_1, completion);
    i.zo4_1 = $this$withContext;
    return i;
  };
  function UstadAccountManager$registerWithPasskey$slambda_0($learningSpaceUrl, this$0, $passkeyResult, $person, $isMinor, resultContinuation) {
    var i = new UstadAccountManager$registerWithPasskey$slambda($learningSpaceUrl, this$0, $passkeyResult, $person, $isMinor, 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.qo5_1 = this$0;
    this.ro5_1 = $learningSpaceUrl;
    this.so5_1 = $accountRegisterOptions;
    this.to5_1 = $person;
    this.uo5_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda).fo6 = 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.fo6((!(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 = 7;
            assertNotClosed(this.qo5_1);
            this.wo5_1 = new LearningSpace(this.ro5_1);
            this.xo5_1 = this.so5_1.mnu_1;
            var tmp_0 = this;
            var this_0 = _get_httpClient__2ty1zc(this.qo5_1);
            var this_1 = new HttpRequestBuilder();
            url(this_1, removeSuffix(this.ro5_1, '/') + '/auth/register');
            contentType(this_1, Application_getInstance().v2r_1);
            setBodyJson(this_1, _get_json__d8whur(this.qo5_1), Companion_instance_50.n4r(), new RegisterRequest(this.to5_1, this.uo5_1, this.xo5_1, this.ro5_1));
            this_1.w38_1 = Companion_getInstance().m2x_1;
            tmp_0.yo5_1 = new HttpStatement(this_1, this_0);
            this.hd_1 = 1;
            suspendResult = this.yo5_1.g3z(UstadAccountManager$register$slambda$slambda_0(this.qo5_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zo5_1 = suspendResult;
            this.ao6_1 = this.zo5_1.y6();
            this.bo6_1 = this.zo5_1.z6();
            if (this.bo6_1 === 200 ? !(this.ao6_1 == null) : false) {
              var tmp_1 = this;
              var this_2 = this.qo5_1.vnx_1;
              var context = this.wo5_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.do6_1 = tmp_4.d58(isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE(), null).ak4();
              this.hd_1 = 2;
              suspendResult = getSiteFromDbOrLoadFromHttp(this.qo5_1, this.do6_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (this.bo6_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.bo6_1);
              }
            }

          case 2:
            var tmp_8 = this;
            var this_3 = this.qo5_1.vnx_1;
            var context_0 = this.wo5_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.eo6_1 = tmp_11.d58(isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE(), 1);
            this.hd_1 = 3;
            suspendResult = withDoorTransactionAsync(this.eo6_1, VOID, UstadAccountManager$register$slambda$slambda_2(this.eo6_1, this.ao6_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            if (this.so5_1.lnu_1) {
              this.hd_1 = 4;
              suspendResult = this.qo5_1.ho5(this.ao6_1, this.ro5_1, this.uo5_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 4:
            var session = suspendResult;
            this.qo5_1.znz(session);
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.co6_1 = this.ao6_1;
            this.hd_1 = 6;
            continue $sm;
          case 6:
            return this.co6_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);
  };
  protoOf(UstadAccountManager$register$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadAccountManager$register$slambda(this.qo5_1, this.ro5_1, this.so5_1, this.to5_1, this.uo5_1, completion);
    i.vo5_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.fo6($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$addSession$slambda(this$0, $learningSpace, $person, $password, $authManager, $dataLayer, resultContinuation) {
    this.oo6_1 = this$0;
    this.po6_1 = $learningSpace;
    this.qo6_1 = $person;
    this.ro6_1 = $password;
    this.so6_1 = $authManager;
    this.to6_1 = $dataLayer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$addSession$slambda).go7 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$addSession$slambda).he = function (p1, $completion) {
    return this.go7(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.oo6_1.vnx_1;
            var context = this.po6_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.vo6_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null).q64_1;
            var tmp_5 = this;
            tmp_5.wo6_1 = new UserSession();
            var tmp_6 = this;
            tmp_6.xo6_1 = this.wo6_1;
            this.xo6_1.cil_1 = this.vo6_1;
            this.xo6_1.bil_1 = this.qo6_1.f96_1;
            this.xo6_1.dil_1 = systemTimeInMillis();
            var tmp_7 = this.xo6_1;
            tmp_7.iil_1 = 1;
            var tmp_8 = this.xo6_1;
            tmp_8.fil_1 = 1;
            this.yo6_1 = this.ro6_1;
            if (this.yo6_1 == null) {
              this.zo6_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_9 = this;
              tmp_9.ao7_1 = this.yo6_1;
              var tmp_10 = this;
              tmp_10.bo7_1 = this.ao7_1;
              this.hd_1 = 1;
              suspendResult = encryptPbkdf2(this.so6_1, this.bo7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.co7_1 = suspendResult;
            this.zo6_1 = toHexString(this.co7_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.do7_1 = this.zo6_1;
            this.xo6_1.hil_1 = this.do7_1;
            this.hd_1 = 3;
            suspendResult = this.to6_1.bk4().b7f().dik(this.xo6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.eo7_1 = suspendResult;
            this.xo6_1.wik_1 = this.eo7_1;
            this.fo7_1 = this.wo6_1;
            this.hd_1 = 4;
            suspendResult = this.to6_1.xk3_1.f7e().dh5(this.qo6_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var personPicture = suspendResult;
            return to(this.fo7_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).jo1 = function (it, completion) {
    var i = new UstadAccountManager$addSession$slambda(this.oo6_1, this.po6_1, this.qo6_1, this.ro6_1, this.so6_1, this.to6_1, completion);
    i.uo6_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.go7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$endSession$lambda($session) {
    return function (it) {
      return it === $session.anx_1.xnv_1;
    };
  }
  function UstadAccountManager$loginWithPasskey$slambda(this$0, $currentServerUrl, $passkeyWebAuthNResponse, resultContinuation) {
    this.po7_1 = this$0;
    this.qo7_1 = $currentServerUrl;
    this.ro7_1 = $passkeyWebAuthNResponse;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$loginWithPasskey$slambda).go8 = 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.go8((!(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.po7_1);
            var tmp_0 = this;
            tmp_0.to7_1 = _get_httpClient__2ty1zc(this.po7_1);
            var tmp_1 = this;
            tmp_1.uo7_1 = this.to7_1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, removeSuffix(this.qo7_1, '/') + '/api/passkey/verifypasskey');
            setBodyJson(this_0, _get_json__d8whur(this.po7_1), Companion_instance_94.n4r(), this.ro7_1);
            parameter(this_0, 'rpId', Url(_get_apiUrlConfig__mldllg(this.po7_1).ho8_1).y30_1);
            tmp_2.vo7_1 = this_0;
            this.vo7_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_3 = this;
            tmp_3.wo7_1 = this.uo7_1;
            var tmp_4 = this;
            tmp_4.xo7_1 = this.vo7_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.xo7_1, this.wo7_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

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

            this.bo8_1 = new UmAccount(this.ao8_1.mo8_1);
            this.bo8_1.fl0_1 = this.qo7_1;
            var tmp_7 = this;
            var this_4 = this.po7_1.vnx_1;
            var context = new LearningSpace(this.qo7_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.co8_1 = tmp_10.d58(isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE(), null).ak4();
            this.hd_1 = 3;
            suspendResult = this.co8_1.n7d().lg4(this.ao8_1.mo8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_12.eo8_1 = tmp_13;
            this.fo8_1 = ensureNotNull(this.eo8_1.zg5_1);
            this.bo8_1.jl0_1 = this.fo8_1.n96_1;
            this.hd_1 = 4;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.po7_1, this.co8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 5;
            suspendResult = this.po7_1.ho5(this.fo8_1, this.qo7_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var newSession = suspendResult;
            this.po7_1.znz(newSession);
            return this.bo8_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.po7_1, this.qo7_1, this.ro7_1, completion);
    i.so7_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.go8($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$login$slambda(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation) {
    this.xo8_1 = this$0;
    this.yo8_1 = $endpointUrl;
    this.zo8_1 = $username;
    this.ao9_1 = $password;
    this.bo9_1 = $maxDateOfBirth;
    this.co9_1 = $dontSetCurrentSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$login$slambda).go8 = 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.go8((!(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.xo8_1);
            var tmp_0 = this;
            var this_0 = get_direct(this.xo8_1.vnx_1);
            var context = new LearningSpace(this.yo8_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.eo9_1 = tmp_4.d58(isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE(), null);
            var tmp_6 = this;
            var tmp_7 = this.eo9_1.yk3_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.yo8_1);
            } else {
              tmp_8 = tmp2_elvis_lhs;
            }

            tmp_6.fo9_1 = tmp_8;
            var tmp_9 = this;
            tmp_9.go9_1 = _get_httpClient__2ty1zc(this.xo8_1);
            var tmp_10 = this;
            tmp_10.ho9_1 = this.go9_1;
            var tmp_11 = this;
            var this_1 = new HttpRequestBuilder();
            url(this_1, removeSuffix(this.yo8_1, '/') + '/auth/login');
            parameter(this_1, 'username', this.zo8_1);
            parameter(this_1, 'password', this.ao9_1);
            parameter(this_1, 'maxDateOfBirth', this.bo9_1);
            header(this_1, 'X-nid', this.fo9_1);
            set_expectSuccess(this_1, false);
            tmp_11.io9_1 = this_1;
            this.io9_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_12 = this;
            tmp_12.jo9_1 = this.ho9_1;
            var tmp_13 = this;
            tmp_13.ko9_1 = this.io9_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.ko9_1, this.jo9_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            var tmp_14 = this;
            tmp_14.mo9_1 = _get_json__d8whur(this.xo8_1);
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.lo9_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.no9_1 = suspendResult;
            var tmp_15 = this;
            var this_2 = this.mo9_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(UmAccount), arrayOf([]), false));
            tmp_15.oo9_1 = this.mo9_1.s45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), this.no9_1);
            this.oo9_1.fl0_1 = this.yo8_1;
            this.hd_1 = 3;
            suspendResult = this.eo9_1.bk4().n7d().lg4(this.oo9_1.cl0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_16.qo9_1 = tmp_17;
            this.ro9_1 = ensureNotNull(this.qo9_1.zg5_1);
            this.oo9_1.jl0_1 = this.ro9_1.n96_1;
            this.hd_1 = 4;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.xo8_1, this.eo9_1.bk4(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 5;
            suspendResult = this.xo8_1.ho5(this.ro9_1, this.yo8_1, this.ao9_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var newSession = suspendResult;
            if (!this.co9_1) {
              this.xo8_1.znz(newSession);
            }

            return this.oo9_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.xo8_1, this.yo8_1, this.zo8_1, this.ao9_1, this.bo9_1, this.co9_1, completion);
    i.do9_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.go8($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $activeSessionsListCOROUTINE$3(_this__u8e3s4, endpointFilter, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.aoa_1 = _this__u8e3s4;
    this.boa_1 = endpointFilter;
  }
  protoOf($activeSessionsListCOROUTINE$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.aoa_1.xnx_1.t2();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (this.boa_1.fo3(element.xnv_1)) {
                destination.i1(element);
              }
            }

            tmp_0.coa_1 = destination;
            var tmp_1 = this;
            tmp_1.doa_1 = this.coa_1;
            var tmp_2 = this;
            tmp_2.eoa_1 = ArrayList_init_$Create$();
            this.foa_1 = this.doa_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.foa_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.goa_1 = this.foa_1.e();
            var tmp_3 = this;
            tmp_3.hoa_1 = this.goa_1;
            var tmp_4 = this;
            var this_1 = this.aoa_1.vnx_1;
            var context = this.hoa_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.ioa_1 = tmp_7.d58(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), 1);
            this.hd_1 = 2;
            suspendResult = this.ioa_1.b7f().fik(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.hoa_1));
            }

            var list = destination_0;
            addAll(this.eoa_1, list);
            this.hd_1 = 1;
            continue $sm;
          case 3:
            return this.eoa_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$4(_this__u8e3s4, maxDateOfBirth, endpointFilter, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.roa_1 = _this__u8e3s4;
    this.soa_1 = maxDateOfBirth;
    this.toa_1 = endpointFilter;
  }
  protoOf($activeSessionCountCOROUTINE$4).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.roa_1.xnx_1.t2();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (this.toa_1.fo3(element.xnv_1)) {
                destination.i1(element);
              }
            }

            tmp_0.uoa_1 = destination;
            var tmp_1 = this;
            tmp_1.voa_1 = 0;
            this.woa_1 = this.voa_1;
            this.xoa_1 = this.uoa_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.xoa_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.yoa_1 = this.xoa_1.e();
            var tmp_2 = this;
            tmp_2.zoa_1 = this.woa_1;
            var tmp_3 = this;
            tmp_3.aob_1 = this.yoa_1;
            var tmp_4 = this;
            var this_1 = this.roa_1.vnx_1;
            var context = this.aob_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.bob_1 = tmp_7.d58(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), 1);
            this.hd_1 = 2;
            suspendResult = this.bob_1.b7f().gik(this.soa_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            this.woa_1 = this.zoa_1 + ARGUMENT | 0;
            this.hd_1 = 1;
            continue $sm;
          case 3:
            return this.woa_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$5(_this__u8e3s4, person, learningSpaceUrl, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.kob_1 = _this__u8e3s4;
    this.lob_1 = person;
    this.mob_1 = learningSpaceUrl;
    this.nob_1 = password;
  }
  protoOf($addSessionCOROUTINE$5).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.kob_1);
            this.oob_1 = new LearningSpace(this.mob_1);
            var tmp_0 = this;
            var this_0 = this.kob_1.vnx_1;
            var context = this.oob_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.pob_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            if (!this.kob_1.xnx_1.t2().a1(this.oob_1)) {
              this.hd_1 = 1;
              suspendResult = addActiveLearningSpace(this.kob_1, this.oob_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            commitActiveEndpointsToPref(this.kob_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp_5 = this;
            var this_1 = this.kob_1.vnx_1;
            var context_0 = this.oob_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.qob_1 = tmp_8.d58(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), null);
            this.hd_1 = 3;
            var tmp_10 = this.pob_1.bk4();
            suspendResult = withDoorTransactionAsync(tmp_10, VOID, UstadAccountManager$addSession$slambda_0(this.kob_1, this.oob_1, this.lob_1, this.nob_1, this.qob_1, this.pob_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.lob_1, this.oob_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$7(_this__u8e3s4, session, endStatus, endReason, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zob_1 = _this__u8e3s4;
    this.aoc_1 = session;
    this.boc_1 = endStatus;
    this.coc_1 = endReason;
  }
  protoOf($endSessionCOROUTINE$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 this_0 = this.zob_1.vnx_1;
            var context = this.aoc_1.anx_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.doc_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            this.hd_1 = 1;
            suspendResult = this.doc_1.bk4().b7f().hik(this.aoc_1.ynw_1.wik_1, this.boc_1, this.coc_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (this.zob_1.eoc().ynw_1.wik_1.equals(this.aoc_1.ynw_1.wik_1) ? this.zob_1.eoc().anx_1.equals(this.aoc_1.anx_1) : false) {
              this.zob_1.znz(makeNewTempGuestSession(this.zob_1, this.aoc_1.anx_1.xnv_1, this.doc_1.bk4()));
            }

            this.hd_1 = 2;
            var tmp_5 = UstadAccountManager$endSession$lambda(this.aoc_1);
            suspendResult = this.zob_1.foc(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.zob_1, this.aoc_1.anx_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$8(_this__u8e3s4, repo, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.yo2_1 = _this__u8e3s4;
    this.zo2_1 = repo;
  }
  protoOf($getSiteFromDbOrLoadFromHttpCOROUTINE$8).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.zo2_1;
            var tmp_2 = (isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : THROW_CCE()).x5i();
            tmp_0.ao3_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : THROW_CCE();
            this.hd_1 = 1;
            suspendResult = this.ao3_1.v7e().qho(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.bo3_1 = suspendResult;
            if (this.bo3_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.zo2_1.v7e().qho(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$10(_this__u8e3s4, learningSpaceUrl, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ooc_1 = _this__u8e3s4;
    this.poc_1 = learningSpaceUrl;
  }
  protoOf($startGuestSessionCOROUTINE$10).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.ooc_1.vnx_1;
            var context = new LearningSpace(this.poc_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.qoc_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            this.hd_1 = 1;
            var tmp_5 = this.qoc_1.bk4();
            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.roc_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.ooc_1, this.qoc_1.bk4(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            suspendResult = this.ooc_1.ho5(this.roc_1, this.poc_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var guestSession = suspendResult;
            this.ooc_1.znz(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_21();
    this.unx_1 = settings;
    this.vnx_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = this.vnx_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.znx_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.vnx_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.any_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.vnx_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.bny_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.vnx_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.cny_1 = Instance(this_3, tmp$ret$6, null).a5d(this, apiUrlConfig$factory());
    this.dny_1 = atomic$boolean$1(false);
    this.eny_1 = CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
    var tmp0_elvis_lhs = this.unx_1.fm9('accountmgr.activeendpoint');
    var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? _get_apiUrlConfig__mldllg(this).io8_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.vnx_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.unx_1.fm9('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.wnx_1 = MutableStateFlow(initUserSession);
    var tmp4_safe_receiver = this.unx_1.fm9('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.xnx_1 = MutableStateFlow(destination);
    this.ynx_1 = MutableStateFlow(listOf_0(initUserSession));
    launch(this.eny_1, VOID, VOID, UstadAccountManager$slambda_0(this, null));
    launch(this.eny_1, VOID, VOID, UstadAccountManager$slambda_2(this, null));
  }
  protoOf(UstadAccountManager).znz = function (value) {
    this.wnx_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.unx_1;
    var key = 'accountmgr.activesession';
    this_3.em9(key, activeAccountJson);
    // Inline function 'com.russhwolf.settings.set' call
    var this_4 = this.unx_1;
    var key_0 = 'accountmgr.activeendpoint';
    var value_0 = value.anx_1.xnv_1;
    this_4.em9(key_0, value_0);
  };
  protoOf(UstadAccountManager).eoc = function () {
    return this.wnx_1.t2();
  };
  protoOf(UstadAccountManager).soc = function () {
    return asStateFlow(this.wnx_1);
  };
  protoOf(UstadAccountManager).toc = function () {
    return this.wnx_1.t2().dnx();
  };
  protoOf(UstadAccountManager).uoc = function () {
    return asStateFlow(this.ynx_1);
  };
  protoOf(UstadAccountManager).voc = function () {
    return this.wnx_1.t2().anx_1;
  };
  protoOf(UstadAccountManager).foc = function (endpointFilter, $completion) {
    var tmp = new $activeSessionsListCOROUTINE$3(this, endpointFilter, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).woc = function (maxDateOfBirth, endpointFilter, $completion) {
    var tmp = new $activeSessionCountCOROUTINE$4(this, maxDateOfBirth, endpointFilter, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).xoc = 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.woc(maxDateOfBirth, endpointFilter, $completion) : $super.woc.call(this, maxDateOfBirth, endpointFilter, $completion);
  };
  protoOf(UstadAccountManager).yoc = function (learningSpaceUrl, passkeyResult, person, personPicture, isMinor, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$registerWithPasskey$slambda_0(learningSpaceUrl, this, passkeyResult, person, isMinor, null), $completion);
  };
  protoOf(UstadAccountManager).zoc = 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).ho5 = function (person, learningSpaceUrl, password, $completion) {
    var tmp = new $addSessionCOROUTINE$5(this, person, learningSpaceUrl, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).aod = function (session, endStatus, endReason, $completion) {
    var tmp = new $endSessionCOROUTINE$7(this, session, endStatus, endReason, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).bod = 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.aod(session, endStatus, endReason, $completion) : $super.aod.call(this, session, endStatus, endReason, $completion);
  };
  protoOf(UstadAccountManager).cod = function (passkeyWebAuthNResponse, currentServerUrl, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$loginWithPasskey$slambda_0(this, currentServerUrl, passkeyWebAuthNResponse, null), $completion);
  };
  protoOf(UstadAccountManager).dod = 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).eod = function (learningSpaceUrl, $completion) {
    var tmp = new $startGuestSessionCOROUTINE$10(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_5() {
    this.fod_1 = 101;
  }
  var Companion_instance_54;
  function Companion_getInstance_22() {
    return Companion_instance_54;
  }
  function Companion_6() {
  }
  protoOf(Companion_6).n4r = function () {
    return AnchorSerializer_getInstance();
  };
  var Companion_instance_55;
  function Companion_getInstance_23() {
    return Companion_instance_55;
  }
  function Anchor(content, href) {
    content = content === VOID ? '' : content;
    href = href === VOID ? '' : href;
    this.god_1 = content;
    this.hod_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.iod_1 = buildClassSerialDescriptor('a', []);
  }
  protoOf(AnchorSerializer).q44 = function () {
    return this.iod_1;
  };
  protoOf(AnchorSerializer).s44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeDynamic(this, decoder.ulg());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = this.iod_1;
      var composite = decoder.i48(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.AnchorSerializer.deserialize.<anonymous>' call
      var result = composite.v48(AnchorSerializer_getInstance().iod_1, 0, Companion_instance_55.n4r());
      composite.j48(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(AnchorSerializer).jod = function (encoder, value) {
    encoder.z49(Companion_instance_55.n4r(), value);
  };
  protoOf(AnchorSerializer).r44 = function (encoder, value) {
    return this.jod(encoder, value instanceof Anchor ? value : THROW_CCE());
  };
  var AnchorSerializer_instance;
  function AnchorSerializer_getInstance() {
    if (AnchorSerializer_instance == null)
      new AnchorSerializer();
    return AnchorSerializer_instance;
  }
  function Companion_7() {
  }
  protoOf(Companion_7).n4r = function () {
    return BodySerializer_instance;
  };
  var Companion_instance_56;
  function Companion_getInstance_24() {
    return Companion_instance_56;
  }
  function Body(navigationElements) {
    this.kod_1 = navigationElements;
  }
  function BodySerializer() {
  }
  protoOf(BodySerializer).q44 = function () {
    return buildClassSerialDescriptor('body', []);
  };
  protoOf(BodySerializer).s44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = this.lod(decoder, decoder.ulg());
    } 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_56.n4r());
      composite.j48(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(BodySerializer).lod = function (decoder, reader) {
    var xml = this.mod(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().sla() === 'body' : false)) {
      if (reader.bl7().equals(EventType_START_ELEMENT_getInstance()) ? reader.tl6() === 'nav' : false) {
        // Inline function 'kotlin.collections.plusAssign' call
        var element = xml.hll(Companion_instance_58.n4r(), reader);
        navElementList.i1(element);
      }
    }
    var result = Unit_instance;
    composite.j48(descriptor);
    return new Body(toList(navElementList));
  };
  protoOf(BodySerializer).nod = function (encoder, value) {
    encoder.z49(Companion_instance_56.n4r(), value);
  };
  protoOf(BodySerializer).r44 = function (encoder, value) {
    return this.nod(encoder, value instanceof Body ? value : THROW_CCE());
  };
  protoOf(BodySerializer).mod = function (decoder) {
    return (isInterface(decoder, XmlInput) ? decoder : THROW_CCE()).dlj();
  };
  var BodySerializer_instance;
  function BodySerializer_getInstance() {
    return BodySerializer_instance;
  }
  function Companion_8() {
  }
  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.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.ood_1 = tmp0_serialDesc;
  }
  protoOf($serializer_3).q44 = function () {
    return this.ood_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(AnchorSerializer_getInstance()), get_nullable(SpanSerializer_getInstance()), get_nullable($serializer_getInstance_18())];
  };
  protoOf($serializer_3).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_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_18(), 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_18(), 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_3).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, AnchorSerializer_getInstance(), value.qod_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.rod_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, SpanSerializer_getInstance(), value.rod_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.sod_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, $serializer_getInstance_18(), value.sod_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_3).r44 = function (encoder, value) {
    return this.pod(encoder, value instanceof ListItem ? value : THROW_CCE());
  };
  var $serializer_instance_3;
  function $serializer_getInstance_15() {
    if ($serializer_instance_3 == null)
      new $serializer_3();
    return $serializer_instance_3;
  }
  function ListItem_init_$Init$(seen1, anchor, span, orderedList, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_15().ood_1);
    }
    if (0 === (seen1 & 1))
      $this.qod_1 = null;
    else
      $this.qod_1 = anchor;
    if (0 === (seen1 & 2))
      $this.rod_1 = null;
    else
      $this.rod_1 = span;
    if (0 === (seen1 & 4))
      $this.sod_1 = null;
    else
      $this.sod_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.qod_1 = anchor;
    this.rod_1 = span;
    this.sod_1 = orderedList;
  }
  function Companion_9() {
  }
  protoOf(Companion_9).n4r = function () {
    return $serializer_getInstance_16();
  };
  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.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.tod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_4).q44 = function () {
    return this.tod_1;
  };
  protoOf($serializer_4).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_18()];
  };
  protoOf($serializer_4).s44 = function (decoder) {
    var tmp0_desc = this.tod_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_18(), 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_18(), 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_4).uod = function (encoder, value) {
    var tmp0_desc = this.tod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.vod_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.vod_1);
    }
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance_18(), value.wod_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_4).r44 = function (encoder, value) {
    return this.uod(encoder, value instanceof NavElement ? value : THROW_CCE());
  };
  var $serializer_instance_4;
  function $serializer_getInstance_16() {
    if ($serializer_instance_4 == null)
      new $serializer_4();
    return $serializer_instance_4;
  }
  function NavElement_init_$Init$(seen1, epubType, orderedList, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_16().tod_1);
    }
    if (0 === (seen1 & 1))
      $this.vod_1 = null;
    else
      $this.vod_1 = epubType;
    $this.wod_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_10() {
    this.xod_1 = 'http://www.w3.org/1999/xhtml';
    this.yod_1 = 'http://www.idpf.org/2007/ops';
  }
  var Companion_instance_59;
  function Companion_getInstance_27() {
    return Companion_instance_59;
  }
  function $serializer_5() {
    $serializer_instance_5 = 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.zod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_5).q44 = function () {
    return this.zod_1;
  };
  protoOf($serializer_5).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BodySerializer_instance];
  };
  protoOf($serializer_5).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_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_5).aoe = function (encoder, value) {
    var tmp0_desc = this.zod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, BodySerializer_instance, value.boe_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_5).r44 = function (encoder, value) {
    return this.aoe(encoder, value instanceof NavigationDocument ? value : THROW_CCE());
  };
  var $serializer_instance_5;
  function $serializer_getInstance_17() {
    if ($serializer_instance_5 == null)
      new $serializer_5();
    return $serializer_instance_5;
  }
  function NavigationDocument_init_$Init$(seen1, bodyElement, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_17().zod_1);
    }
    $this.boe_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.boe_1 = bodyElement;
  }
  function Companion_11() {
    Companion_instance_60 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.coe_1 = [new ArrayListSerializer($serializer_getInstance_15())];
  }
  var Companion_instance_60;
  function Companion_getInstance_28() {
    if (Companion_instance_60 == null)
      new Companion_11();
    return Companion_instance_60;
  }
  function $serializer_6() {
    $serializer_instance_6 = 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.doe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_6).q44 = function () {
    return this.doe_1;
  };
  protoOf($serializer_6).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_28().coe_1[0]];
  };
  protoOf($serializer_6).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_input = decoder.i48(tmp0_desc);
    var tmp6_cached = Companion_getInstance_28().coe_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_6).eoe = function (encoder, value) {
    var tmp0_desc = this.doe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_28().coe_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.foe_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_6).r44 = function (encoder, value) {
    return this.eoe(encoder, value instanceof OrderedList ? value : THROW_CCE());
  };
  var $serializer_instance_6;
  function $serializer_getInstance_18() {
    if ($serializer_instance_6 == null)
      new $serializer_6();
    return $serializer_instance_6;
  }
  function OrderedList_init_$Init$(seen1, listItems, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_18().doe_1);
    }
    $this.foe_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_12() {
  }
  protoOf(Companion_12).n4r = function () {
    return SpanSerializer_getInstance();
  };
  var Companion_instance_61;
  function Companion_getInstance_29() {
    return Companion_instance_61;
  }
  function Span(content) {
    content = content === VOID ? '' : content;
    this.goe_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.hoe_1 = buildClassSerialDescriptor('span', []);
  }
  protoOf(SpanSerializer).q44 = function () {
    return this.hoe_1;
  };
  protoOf(SpanSerializer).s44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeDynamic_0(this, decoder.ulg());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = AnchorSerializer_getInstance().iod_1;
      var composite = decoder.i48(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.SpanSerializer.deserialize.<anonymous>' call
      var result = composite.v48(AnchorSerializer_getInstance().iod_1, 0, Companion_instance_61.n4r());
      composite.j48(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(SpanSerializer).ioe = function (encoder, value) {
    encoder.z49(Companion_instance_61.n4r(), value);
  };
  protoOf(SpanSerializer).r44 = function (encoder, value) {
    return this.ioe(encoder, value instanceof Span ? value : THROW_CCE());
  };
  var SpanSerializer_instance;
  function SpanSerializer_getInstance() {
    if (SpanSerializer_instance == null)
      new SpanSerializer();
    return SpanSerializer_instance;
  }
  function $serializer_7() {
    $serializer_instance_7 = 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.joe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_7).q44 = function () {
    return this.joe_1;
  };
  protoOf($serializer_7).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_7).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_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_7).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 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.loe_1);
    }
    tmp1_output.w49(tmp0_desc, 1, value.moe_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_7).r44 = function (encoder, value) {
    return this.koe(encoder, value instanceof Content ? value : THROW_CCE());
  };
  var $serializer_instance_7;
  function $serializer_getInstance_19() {
    if ($serializer_instance_7 == null)
      new $serializer_7();
    return $serializer_instance_7;
  }
  function Content_init_$Init$(seen1, id, src, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_19().joe_1);
    }
    if (0 === (seen1 & 1))
      $this.loe_1 = null;
    else
      $this.loe_1 = id;
    $this.moe_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_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.noe_1 = [new ArrayListSerializer($serializer_getInstance_26())];
  }
  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.DocTitle', this, 1);
    tmp0_serialDesc.t4f('texts', false);
    tmp0_serialDesc.v4f(new XmlSerialName('docTitle', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.ooe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_8).q44 = function () {
    return this.ooe_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().noe_1[0]];
  };
  protoOf($serializer_8).s44 = function (decoder) {
    var tmp0_desc = this.ooe_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().noe_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_8).poe = function (encoder, value) {
    var tmp0_desc = this.ooe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_30().noe_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.qoe_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_8).r44 = function (encoder, value) {
    return this.poe(encoder, value instanceof DocTitle ? value : THROW_CCE());
  };
  var $serializer_instance_8;
  function $serializer_getInstance_20() {
    if ($serializer_instance_8 == null)
      new $serializer_8();
    return $serializer_instance_8;
  }
  function DocTitle_init_$Init$(seen1, texts, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_20().ooe_1);
    }
    $this.qoe_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_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.roe_1 = [new ArrayListSerializer($serializer_getInstance_36())];
  }
  var Companion_instance_63;
  function Companion_getInstance_31() {
    if (Companion_instance_63 == null)
      new Companion_14();
    return Companion_instance_63;
  }
  function $serializer_9() {
    $serializer_instance_9 = 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.soe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_9).q44 = function () {
    return this.soe_1;
  };
  protoOf($serializer_9).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_31().roe_1[0]];
  };
  protoOf($serializer_9).s44 = function (decoder) {
    var tmp0_desc = this.soe_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().roe_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_9).toe = function (encoder, value) {
    var tmp0_desc = this.soe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_31().roe_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !equals(value.uoe_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.uoe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_9).r44 = function (encoder, value) {
    return this.toe(encoder, value instanceof Head ? value : THROW_CCE());
  };
  var $serializer_instance_9;
  function $serializer_getInstance_21() {
    if ($serializer_instance_9 == null)
      new $serializer_9();
    return $serializer_instance_9;
  }
  function Head_init_$Init$(seen1, metadata, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_21().soe_1);
    }
    if (0 === (seen1 & 1))
      $this.uoe_1 = emptyList();
    else
      $this.uoe_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_31();
    metadata = metadata === VOID ? emptyList() : metadata;
    this.uoe_1 = metadata;
  }
  function $serializer_10() {
    $serializer_instance_10 = 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.voe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_10).q44 = function () {
    return this.voe_1;
  };
  protoOf($serializer_10).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_26()];
  };
  protoOf($serializer_10).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_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, $serializer_getInstance_26(), 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_26(), 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_10).woe = function (encoder, value) {
    var tmp0_desc = this.voe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_26(), value.xoe_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_10).r44 = function (encoder, value) {
    return this.woe(encoder, value instanceof NavLabel ? value : THROW_CCE());
  };
  var $serializer_instance_10;
  function $serializer_getInstance_22() {
    if ($serializer_instance_10 == null)
      new $serializer_10();
    return $serializer_instance_10;
  }
  function NavLabel_init_$Init$(seen1, text, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_22().voe_1);
    }
    $this.xoe_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_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.yoe_1 = [new ArrayListSerializer($serializer_getInstance_24())];
  }
  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.NavMap', this, 1);
    tmp0_serialDesc.t4f('navPoints', false);
    tmp0_serialDesc.v4f(new XmlSerialName('navMap', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.zoe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_11).q44 = function () {
    return this.zoe_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().yoe_1[0]];
  };
  protoOf($serializer_11).s44 = function (decoder) {
    var tmp0_desc = this.zoe_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_32().yoe_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_11).aof = function (encoder, value) {
    var tmp0_desc = this.zoe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_32().yoe_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.bof_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_11).r44 = function (encoder, value) {
    return this.aof(encoder, value instanceof NavMap ? value : THROW_CCE());
  };
  var $serializer_instance_11;
  function $serializer_getInstance_23() {
    if ($serializer_instance_11 == null)
      new $serializer_11();
    return $serializer_instance_11;
  }
  function NavMap_init_$Init$(seen1, navPoints, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_23().zoe_1);
    }
    $this.bof_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_16() {
    Companion_instance_65 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.cof_1 = [new ArrayListSerializer($serializer_getInstance_22()), null, null, null];
  }
  var Companion_instance_65;
  function Companion_getInstance_33() {
    if (Companion_instance_65 == null)
      new Companion_16();
    return Companion_instance_65;
  }
  function $serializer_12() {
    $serializer_instance_12 = 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.dof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_12).q44 = function () {
    return this.dof_1;
  };
  protoOf($serializer_12).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_33().cof_1[0], $serializer_getInstance_19(), StringSerializer_getInstance(), new ArrayListSerializer($serializer_getInstance_24())];
  };
  protoOf($serializer_12).s44 = function (decoder) {
    var tmp0_desc = this.dof_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_33().cof_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_19(), 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_24()), 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_19(), 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_24()), 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_12).eof = function (encoder, value) {
    var tmp0_desc = this.dof_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_33().cof_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.fof_1);
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance_19(), value.gof_1);
    tmp1_output.w49(tmp0_desc, 2, value.hof_1);
    tmp1_output.y49(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_24()), value.iof_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_12).r44 = function (encoder, value) {
    return this.eof(encoder, value instanceof NavPoint ? value : THROW_CCE());
  };
  var $serializer_instance_12;
  function $serializer_getInstance_24() {
    if ($serializer_instance_12 == null)
      new $serializer_12();
    return $serializer_instance_12;
  }
  function NavPoint_init_$Init$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_24().dof_1);
    }
    $this.fof_1 = navLabels;
    $this.gof_1 = content;
    $this.hof_1 = id;
    $this.iof_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_17() {
    this.jof_1 = 'http://www.daisy.org/z3986/2005/ncx/';
    this.kof_1 = 'application/x-dtbncx+xml';
  }
  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.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.lof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_13).q44 = function () {
    return this.lof_1;
  };
  protoOf($serializer_13).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_21(), $serializer_getInstance_20(), $serializer_getInstance_23()];
  };
  protoOf($serializer_13).s44 = function (decoder) {
    var tmp0_desc = this.lof_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_21(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, $serializer_getInstance_20(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, $serializer_getInstance_23(), 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_21(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, $serializer_getInstance_20(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, $serializer_getInstance_23(), 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_13).mof = function (encoder, value) {
    var tmp0_desc = this.lof_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_21(), value.nof_1);
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance_20(), value.oof_1);
    tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_23(), value.pof_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_13).r44 = function (encoder, value) {
    return this.mof(encoder, value instanceof NcxDocument ? value : THROW_CCE());
  };
  var $serializer_instance_13;
  function $serializer_getInstance_25() {
    if ($serializer_instance_13 == null)
      new $serializer_13();
    return $serializer_instance_13;
  }
  function NcxDocument_init_$Init$(seen1, head, docTitle, navMap, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_25().lof_1);
    }
    $this.nof_1 = head;
    $this.oof_1 = docTitle;
    $this.pof_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.nof_1 = head;
    this.oof_1 = docTitle;
    this.pof_1 = navMap;
  }
  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.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.qof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_14).q44 = function () {
    return this.qof_1;
  };
  protoOf($serializer_14).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_14).s44 = function (decoder) {
    var tmp0_desc = this.qof_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_14).rof = function (encoder, value) {
    var tmp0_desc = this.qof_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.sof_1 === '')) {
      tmp1_output.w49(tmp0_desc, 0, value.sof_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_14).r44 = function (encoder, value) {
    return this.rof(encoder, value instanceof Text ? value : THROW_CCE());
  };
  var $serializer_instance_14;
  function $serializer_getInstance_26() {
    if ($serializer_instance_14 == null)
      new $serializer_14();
    return $serializer_instance_14;
  }
  function Text_init_$Init$(seen1, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_26().qof_1);
    }
    if (0 === (seen1 & 1))
      $this.sof_1 = '';
    else
      $this.sof_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.sof_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.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.tof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_15).q44 = function () {
    return this.tof_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.tof_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_15).uof = function (encoder, value) {
    var tmp0_desc = this.tof_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.vof_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.vof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.wof_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.wof_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_15).r44 = function (encoder, value) {
    return this.uof(encoder, value instanceof DcCreator ? value : THROW_CCE());
  };
  var $serializer_instance_15;
  function $serializer_getInstance_27() {
    if ($serializer_instance_15 == null)
      new $serializer_15();
    return $serializer_instance_15;
  }
  function DcCreator_init_$Init$(seen1, id, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_27().tof_1);
    }
    if (0 === (seen1 & 1))
      $this.vof_1 = null;
    else
      $this.vof_1 = id;
    if (0 === (seen1 & 2))
      $this.wof_1 = '';
    else
      $this.wof_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.vof_1 = id;
    this.wof_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.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.xof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_16).q44 = function () {
    return this.xof_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.xof_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_16).yof = function (encoder, value) {
    var tmp0_desc = this.xof_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.zof_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.zof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.aog_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.aog_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_16).r44 = function (encoder, value) {
    return this.yof(encoder, value instanceof DcDescription ? value : THROW_CCE());
  };
  var $serializer_instance_16;
  function $serializer_getInstance_28() {
    if ($serializer_instance_16 == null)
      new $serializer_16();
    return $serializer_instance_16;
  }
  function DcDescription_init_$Init$(seen1, lang, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_28().xof_1);
    }
    if (0 === (seen1 & 1))
      $this.zof_1 = null;
    else
      $this.zof_1 = lang;
    if (0 === (seen1 & 2))
      $this.aog_1 = '';
    else
      $this.aog_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.zof_1 = lang;
    this.aog_1 = content;
  }
  function Companion_21() {
  }
  var Companion_instance_70;
  function Companion_getInstance_38() {
    return Companion_instance_70;
  }
  function $serializer_17() {
    $serializer_instance_17 = 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.bog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_17).q44 = function () {
    return this.bog_1;
  };
  protoOf($serializer_17).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_17).s44 = function (decoder) {
    var tmp0_desc = this.bog_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_17).cog = function (encoder, value) {
    var tmp0_desc = this.bog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.dog_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.dog_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.eog_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.eog_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_17).r44 = function (encoder, value) {
    return this.cog(encoder, value instanceof DcIdentifier ? value : THROW_CCE());
  };
  var $serializer_instance_17;
  function $serializer_getInstance_29() {
    if ($serializer_instance_17 == null)
      new $serializer_17();
    return $serializer_instance_17;
  }
  function DcIdentifier_init_$Init$(seen1, id, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_29().bog_1);
    }
    if (0 === (seen1 & 1))
      $this.dog_1 = null;
    else
      $this.dog_1 = id;
    if (0 === (seen1 & 2))
      $this.eog_1 = '';
    else
      $this.eog_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.dog_1 = id;
    this.eog_1 = content;
  }
  function $serializer_18() {
    $serializer_instance_18 = 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.fog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_18).q44 = function () {
    return this.fog_1;
  };
  protoOf($serializer_18).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_18).s44 = function (decoder) {
    var tmp0_desc = this.fog_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_18).gog = function (encoder, value) {
    var tmp0_desc = this.fog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.hog_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_18).r44 = function (encoder, value) {
    return this.gog(encoder, value instanceof DcLanguage ? value : THROW_CCE());
  };
  var $serializer_instance_18;
  function $serializer_getInstance_30() {
    if ($serializer_instance_18 == null)
      new $serializer_18();
    return $serializer_instance_18;
  }
  function DcLanguage_init_$Init$(seen1, content, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_30().fog_1);
    }
    $this.hog_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_22() {
  }
  var Companion_instance_71;
  function Companion_getInstance_39() {
    return Companion_instance_71;
  }
  function $serializer_19() {
    $serializer_instance_19 = 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.iog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_19).q44 = function () {
    return this.iog_1;
  };
  protoOf($serializer_19).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_19).s44 = function (decoder) {
    var tmp0_desc = this.iog_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_19).jog = function (encoder, value) {
    var tmp0_desc = this.iog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.kog_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.kog_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.log_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.log_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_19).r44 = function (encoder, value) {
    return this.jog(encoder, value instanceof DcTitle ? value : THROW_CCE());
  };
  var $serializer_instance_19;
  function $serializer_getInstance_31() {
    if ($serializer_instance_19 == null)
      new $serializer_19();
    return $serializer_instance_19;
  }
  function DcTitle_init_$Init$(seen1, lang, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_31().iog_1);
    }
    if (0 === (seen1 & 1))
      $this.kog_1 = null;
    else
      $this.kog_1 = lang;
    if (0 === (seen1 & 2))
      $this.log_1 = '';
    else
      $this.log_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.kog_1 = lang;
    this.log_1 = content;
  }
  function $serializer_20() {
    $serializer_instance_20 = 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.mog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_20).q44 = function () {
    return this.mog_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(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_20).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_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_20).nog = function (encoder, value) {
    var tmp0_desc = this.mog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.oog_1);
    tmp1_output.w49(tmp0_desc, 1, value.pog_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.qog_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.qog_1);
    }
    tmp1_output.w49(tmp0_desc, 3, value.rog_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_20).r44 = function (encoder, value) {
    return this.nog(encoder, value instanceof Item ? value : THROW_CCE());
  };
  var $serializer_instance_20;
  function $serializer_getInstance_32() {
    if ($serializer_instance_20 == null)
      new $serializer_20();
    return $serializer_instance_20;
  }
  function Item_init_$Init$(seen1, id, href, properties, mediaType, serializationConstructorMarker, $this) {
    if (!(11 === (11 & seen1))) {
      throwMissingFieldException(seen1, 11, $serializer_getInstance_32().mog_1);
    }
    $this.oog_1 = id;
    $this.pog_1 = href;
    if (0 === (seen1 & 4))
      $this.qog_1 = null;
    else
      $this.qog_1 = properties;
    $this.rog_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_23() {
  }
  var Companion_instance_72;
  function Companion_getInstance_40() {
    return Companion_instance_72;
  }
  function $serializer_21() {
    $serializer_instance_21 = 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.sog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_21).q44 = function () {
    return this.sog_1;
  };
  protoOf($serializer_21).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_21).s44 = function (decoder) {
    var tmp0_desc = this.sog_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_21).tog = function (encoder, value) {
    var tmp0_desc = this.sog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.uog_1 === '')) {
      tmp1_output.w49(tmp0_desc, 0, value.uog_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_21).r44 = function (encoder, value) {
    return this.tog(encoder, value instanceof ItemRef ? value : THROW_CCE());
  };
  var $serializer_instance_21;
  function $serializer_getInstance_33() {
    if ($serializer_instance_21 == null)
      new $serializer_21();
    return $serializer_instance_21;
  }
  function ItemRef_init_$Init$(seen1, idRef, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_33().sog_1);
    }
    if (0 === (seen1 & 1))
      $this.uog_1 = '';
    else
      $this.uog_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.uog_1 = idRef;
  }
  function Companion_24() {
    Companion_instance_73 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.vog_1 = [new ArrayListSerializer($serializer_getInstance_32())];
  }
  var Companion_instance_73;
  function Companion_getInstance_41() {
    if (Companion_instance_73 == null)
      new Companion_24();
    return Companion_instance_73;
  }
  function $serializer_22() {
    $serializer_instance_22 = 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.wog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_22).q44 = function () {
    return this.wog_1;
  };
  protoOf($serializer_22).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_41().vog_1[0]];
  };
  protoOf($serializer_22).s44 = function (decoder) {
    var tmp0_desc = this.wog_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_41().vog_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_22).xog = function (encoder, value) {
    var tmp0_desc = this.wog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_41().vog_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !equals(value.yog_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.yog_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_22).r44 = function (encoder, value) {
    return this.xog(encoder, value instanceof Manifest ? value : THROW_CCE());
  };
  var $serializer_instance_22;
  function $serializer_getInstance_34() {
    if ($serializer_instance_22 == null)
      new $serializer_22();
    return $serializer_instance_22;
  }
  function Manifest_init_$Init$(seen1, items, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_34().wog_1);
    }
    if (0 === (seen1 & 1))
      $this.yog_1 = emptyList();
    else
      $this.yog_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_41();
    items = items === VOID ? emptyList() : items;
    this.yog_1 = items;
  }
  function Companion_25() {
  }
  var Companion_instance_74;
  function Companion_getInstance_42() {
    return Companion_instance_74;
  }
  function $serializer_23() {
    $serializer_instance_23 = 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.zog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_23).q44 = function () {
    return this.zog_1;
  };
  protoOf($serializer_23).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_23).s44 = function (decoder) {
    var tmp0_desc = this.zog_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_23).aoh = function (encoder, value) {
    var tmp0_desc = this.zog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.boh_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.boh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.coh_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.coh_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_23).r44 = function (encoder, value) {
    return this.aoh(encoder, value instanceof Meta ? value : THROW_CCE());
  };
  var $serializer_instance_23;
  function $serializer_getInstance_35() {
    if ($serializer_instance_23 == null)
      new $serializer_23();
    return $serializer_instance_23;
  }
  function Meta_init_$Init$(seen1, name, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_35().zog_1);
    }
    if (0 === (seen1 & 1))
      $this.boh_1 = null;
    else
      $this.boh_1 = name;
    if (0 === (seen1 & 2))
      $this.coh_1 = null;
    else
      $this.coh_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.boh_1 = name;
    this.coh_1 = content;
  }
  function Companion_26() {
    Companion_instance_75 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.doh_1 = [new ArrayListSerializer($serializer_getInstance_31()), new ArrayListSerializer($serializer_getInstance_27()), new ArrayListSerializer($serializer_getInstance_30()), new ArrayListSerializer($serializer_getInstance_28()), new ArrayListSerializer($serializer_getInstance_29()), new ArrayListSerializer($serializer_getInstance_35())];
  }
  var Companion_instance_75;
  function Companion_getInstance_43() {
    if (Companion_instance_75 == null)
      new Companion_26();
    return Companion_instance_75;
  }
  function $serializer_24() {
    $serializer_instance_24 = 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.eoh_1 = tmp0_serialDesc;
  }
  protoOf($serializer_24).q44 = function () {
    return this.eoh_1;
  };
  protoOf($serializer_24).k4g = function () {
    var tmp0_cached = Companion_getInstance_43().doh_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_24).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 = 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_43().doh_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_24).foh = function (encoder, value) {
    var tmp0_desc = this.eoh_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_43().doh_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !equals(value.goh_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.goh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !equals(value.hoh_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 1, tmp2_cached[1], value.hoh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !equals(value.ioh_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 2, tmp2_cached[2], value.ioh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !equals(value.joh_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 3, tmp2_cached[3], value.joh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !equals(value.koh_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 4, tmp2_cached[4], value.koh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !equals(value.loh_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 5, tmp2_cached[5], value.loh_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_24).r44 = function (encoder, value) {
    return this.foh(encoder, value instanceof Metadata ? value : THROW_CCE());
  };
  var $serializer_instance_24;
  function $serializer_getInstance_36() {
    if ($serializer_instance_24 == null)
      new $serializer_24();
    return $serializer_instance_24;
  }
  function Metadata_init_$Init$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_36().eoh_1);
    }
    if (0 === (seen1 & 1))
      $this.goh_1 = emptyList();
    else
      $this.goh_1 = titles;
    if (0 === (seen1 & 2))
      $this.hoh_1 = emptyList();
    else
      $this.hoh_1 = creators;
    if (0 === (seen1 & 4))
      $this.ioh_1 = emptyList();
    else
      $this.ioh_1 = languages;
    if (0 === (seen1 & 8))
      $this.joh_1 = emptyList();
    else
      $this.joh_1 = descriptions;
    if (0 === (seen1 & 16))
      $this.koh_1 = emptyList();
    else
      $this.koh_1 = identifiers;
    if (0 === (seen1 & 32))
      $this.loh_1 = emptyList();
    else
      $this.loh_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_43();
    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.goh_1 = titles;
    this.hoh_1 = creators;
    this.ioh_1 = languages;
    this.joh_1 = descriptions;
    this.koh_1 = identifiers;
    this.loh_1 = metas;
  }
  function Companion_27() {
    this.moh_1 = 'http://www.idpf.org/2007/opf';
    this.noh_1 = 'http://purl.org/dc/elements/1.1/';
  }
  protoOf(Companion_27).n4r = function () {
    return $serializer_getInstance_37();
  };
  var Companion_instance_76;
  function Companion_getInstance_44() {
    return Companion_instance_76;
  }
  function $serializer_25() {
    $serializer_instance_25 = 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.ooh_1 = tmp0_serialDesc;
  }
  protoOf($serializer_25).q44 = function () {
    return this.ooh_1;
  };
  protoOf($serializer_25).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_36(), $serializer_getInstance_34(), $serializer_getInstance_38()];
  };
  protoOf($serializer_25).s44 = function (decoder) {
    var tmp0_desc = this.ooh_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_36(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.u48(tmp0_desc, 3, $serializer_getInstance_34(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.u48(tmp0_desc, 4, $serializer_getInstance_38(), 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_36(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.u48(tmp0_desc, 3, $serializer_getInstance_34(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.u48(tmp0_desc, 4, $serializer_getInstance_38(), 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_25).poh = function (encoder, value) {
    var tmp0_desc = this.ooh_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.qoh_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.qoh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.roh_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.roh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !equals(value.soh_1, new Metadata())) {
      tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_36(), value.soh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !equals(value.toh_1, new Manifest())) {
      tmp1_output.y49(tmp0_desc, 3, $serializer_getInstance_34(), value.toh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !equals(value.uoh_1, new Spine())) {
      tmp1_output.y49(tmp0_desc, 4, $serializer_getInstance_38(), value.uoh_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_25).r44 = function (encoder, value) {
    return this.poh(encoder, value instanceof PackageDocument ? value : THROW_CCE());
  };
  var $serializer_instance_25;
  function $serializer_getInstance_37() {
    if ($serializer_instance_25 == null)
      new $serializer_25();
    return $serializer_instance_25;
  }
  function PackageDocument_init_$Init$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_37().ooh_1);
    }
    if (0 === (seen1 & 1))
      $this.qoh_1 = null;
    else
      $this.qoh_1 = version;
    if (0 === (seen1 & 2))
      $this.roh_1 = '';
    else
      $this.roh_1 = uniqueIdentifier;
    if (0 === (seen1 & 4))
      $this.soh_1 = new Metadata();
    else
      $this.soh_1 = metadata;
    if (0 === (seen1 & 8))
      $this.toh_1 = new Manifest();
    else
      $this.toh_1 = manifest;
    if (0 === (seen1 & 16))
      $this.uoh_1 = new Spine();
    else
      $this.uoh_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.qoh_1 = version;
    this.roh_1 = uniqueIdentifier;
    this.soh_1 = metadata;
    this.toh_1 = manifest;
    this.uoh_1 = spine;
  }
  protoOf(PackageDocument).voh = function () {
    var whitespaceRegex = Regex_init_$Create$('\\s+');
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.toh_1.yog_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.qog_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.soh_1.loh_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.boh_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.coh_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.toh_1.yog_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.oog_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).woh = function () {
    var whiteSpaceRegex = Regex_init_$Create$('\\s+');
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.toh_1.yog_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.qog_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.uoh_1.yoh_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.toh_1.yog_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.oog_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.qog_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_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.zoh_1 = [new ArrayListSerializer($serializer_getInstance_33()), null];
  }
  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.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.aoi_1 = tmp0_serialDesc;
  }
  protoOf($serializer_26).q44 = function () {
    return this.aoi_1;
  };
  protoOf($serializer_26).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_45().zoh_1[0], get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_26).s44 = function (decoder) {
    var tmp0_desc = this.aoi_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_45().zoh_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_26).boi = function (encoder, value) {
    var tmp0_desc = this.aoi_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_45().zoh_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !equals(value.xoh_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.xoh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.yoh_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.yoh_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_26).r44 = function (encoder, value) {
    return this.boi(encoder, value instanceof Spine ? value : THROW_CCE());
  };
  var $serializer_instance_26;
  function $serializer_getInstance_38() {
    if ($serializer_instance_26 == null)
      new $serializer_26();
    return $serializer_instance_26;
  }
  function Spine_init_$Init$(seen1, itemRefs, toc, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_38().aoi_1);
    }
    if (0 === (seen1 & 1))
      $this.xoh_1 = emptyList();
    else
      $this.xoh_1 = itemRefs;
    if (0 === (seen1 & 2))
      $this.yoh_1 = null;
    else
      $this.yoh_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_45();
    itemRefs = itemRefs === VOID ? emptyList() : itemRefs;
    toc = toc === VOID ? null : toc;
    this.xoh_1 = itemRefs;
    this.yoh_1 = toc;
  }
  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.coi_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new ArrayListSerializer($serializer_getInstance_40())];
  }
  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.ContentManifest', this, 3);
    tmp0_serialDesc.t4f('version', false);
    tmp0_serialDesc.t4f('metadata', false);
    tmp0_serialDesc.t4f('entries', false);
    this.doi_1 = tmp0_serialDesc;
  }
  protoOf($serializer_27).q44 = function () {
    return this.doi_1;
  };
  protoOf($serializer_27).k4g = function () {
    var tmp0_cached = Companion_getInstance_46().coi_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_27).s44 = function (decoder) {
    var tmp0_desc = this.doi_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_46().coi_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_27).eoi = function (encoder, value) {
    var tmp0_desc = this.doi_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_46().coi_1;
    tmp1_output.r49(tmp0_desc, 0, value.foi_1);
    tmp1_output.y49(tmp0_desc, 1, tmp2_cached[1], value.goi_1);
    tmp1_output.y49(tmp0_desc, 2, tmp2_cached[2], value.hoi_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_27).r44 = function (encoder, value) {
    return this.eoi(encoder, value instanceof ContentManifest ? value : THROW_CCE());
  };
  var $serializer_instance_27;
  function $serializer_getInstance_39() {
    if ($serializer_instance_27 == null)
      new $serializer_27();
    return $serializer_instance_27;
  }
  function ContentManifest_init_$Init$(seen1, version, metadata, entries, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_39().doi_1);
    }
    $this.foi_1 = version;
    $this.goi_1 = metadata;
    $this.hoi_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_46();
    this.foi_1 = version;
    this.goi_1 = metadata;
    this.hoi_1 = entries;
  }
  protoOf(ContentManifest).toString = function () {
    return 'ContentManifest(version=' + this.foi_1 + ', metadata=' + this.goi_1 + ', entries=' + this.hoi_1 + ')';
  };
  protoOf(ContentManifest).hashCode = function () {
    var result = this.foi_1;
    result = imul(result, 31) + hashCode(this.goi_1) | 0;
    result = imul(result, 31) + hashCode(this.hoi_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.foi_1 === tmp0_other_with_cast.foi_1))
      return false;
    if (!equals(this.goi_1, tmp0_other_with_cast.goi_1))
      return false;
    if (!equals(this.hoi_1, tmp0_other_with_cast.hoi_1))
      return false;
    return true;
  };
  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.ioi_1 = [null, null, null, null, null, null, new StringValuesSerializer(), new StringValuesSerializer(), null];
  }
  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.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.joi_1 = tmp0_serialDesc;
  }
  protoOf($serializer_28).q44 = function () {
    return this.joi_1;
  };
  protoOf($serializer_28).k4g = function () {
    var tmp0_cached = Companion_getInstance_47().ioi_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_28).s44 = function (decoder) {
    var tmp0_desc = this.joi_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_47().ioi_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_28).koi = function (encoder, value) {
    var tmp0_desc = this.joi_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_47().ioi_1;
    tmp1_output.w49(tmp0_desc, 0, value.loi_1);
    tmp1_output.s49(tmp0_desc, 1, value.moi_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.noi_1 === true)) {
      tmp1_output.o49(tmp0_desc, 2, value.noi_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.ooi_1 === 200)) {
      tmp1_output.r49(tmp0_desc, 3, value.ooi_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.poi_1 === 'GET')) {
      tmp1_output.w49(tmp0_desc, 4, value.poi_1);
    }
    tmp1_output.w49(tmp0_desc, 5, value.qoi_1);
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !equals(value.roi_1, emptyStringValues())) {
      tmp1_output.y49(tmp0_desc, 6, tmp2_cached[6], value.roi_1);
    }
    tmp1_output.y49(tmp0_desc, 7, tmp2_cached[7], value.soi_1);
    tmp1_output.w49(tmp0_desc, 8, value.toi_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_28).r44 = function (encoder, value) {
    return this.koi(encoder, value instanceof ContentManifestEntry ? value : THROW_CCE());
  };
  var $serializer_instance_28;
  function $serializer_getInstance_40() {
    if ($serializer_instance_28 == null)
      new $serializer_28();
    return $serializer_instance_28;
  }
  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_40().joi_1);
    }
    $this.loi_1 = uri;
    $this.moi_1 = storageSize;
    if (0 === (seen1 & 4))
      $this.noi_1 = true;
    else
      $this.noi_1 = ignoreQueryParams;
    if (0 === (seen1 & 8))
      $this.ooi_1 = 200;
    else
      $this.ooi_1 = status;
    if (0 === (seen1 & 16))
      $this.poi_1 = 'GET';
    else
      $this.poi_1 = method;
    $this.qoi_1 = integrity;
    if (0 === (seen1 & 64))
      $this.roi_1 = emptyStringValues();
    else
      $this.roi_1 = requestHeaders;
    $this.soi_1 = responseHeaders;
    $this.toi_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_31() {
    Companion_instance_80 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.uoi_1 = [new ArrayListSerializer($serializer_getInstance_42()), new ArrayListSerializer($serializer_getInstance_43())];
  }
  var Companion_instance_80;
  function Companion_getInstance_48() {
    if (Companion_instance_80 == null)
      new Companion_31();
    return Companion_instance_80;
  }
  function $serializer_29() {
    $serializer_instance_29 = 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.voi_1 = tmp0_serialDesc;
  }
  protoOf($serializer_29).q44 = function () {
    return this.voi_1;
  };
  protoOf($serializer_29).k4g = function () {
    var tmp0_cached = Companion_getInstance_48().uoi_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_29).s44 = function (decoder) {
    var tmp0_desc = this.voi_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_48().uoi_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_29).woi = function (encoder, value) {
    var tmp0_desc = this.voi_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_48().uoi_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.xoi_1);
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !equals(value.yoi_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 1, tmp2_cached[1], value.yoi_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_29).r44 = function (encoder, value) {
    return this.woi(encoder, value instanceof MediaContentInfo ? value : THROW_CCE());
  };
  var $serializer_instance_29;
  function $serializer_getInstance_41() {
    if ($serializer_instance_29 == null)
      new $serializer_29();
    return $serializer_instance_29;
  }
  function MediaContentInfo_init_$Init$(seen1, sources, subtitles, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_41().voi_1);
    }
    $this.xoi_1 = sources;
    if (0 === (seen1 & 2))
      $this.yoi_1 = emptyList();
    else
      $this.yoi_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_48();
    subtitles = subtitles === VOID ? emptyList() : subtitles;
    this.xoi_1 = sources;
    this.yoi_1 = subtitles;
  }
  function $serializer_30() {
    $serializer_instance_30 = 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.zoi_1 = tmp0_serialDesc;
  }
  protoOf($serializer_30).q44 = function () {
    return this.zoi_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()];
  };
  protoOf($serializer_30).s44 = function (decoder) {
    var tmp0_desc = this.zoi_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_30).aoj = function (encoder, value) {
    var tmp0_desc = this.zoi_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.boj_1);
    tmp1_output.w49(tmp0_desc, 1, value.coj_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_30).r44 = function (encoder, value) {
    return this.aoj(encoder, value instanceof MediaSource ? value : THROW_CCE());
  };
  var $serializer_instance_30;
  function $serializer_getInstance_42() {
    if ($serializer_instance_30 == null)
      new $serializer_30();
    return $serializer_instance_30;
  }
  function MediaSource_init_$Init$(seen1, uri, mimeType, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_42().zoi_1);
    }
    $this.boj_1 = uri;
    $this.coj_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_32() {
  }
  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.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.doj_1 = tmp0_serialDesc;
  }
  protoOf($serializer_31).q44 = function () {
    return this.doj_1;
  };
  protoOf($serializer_31).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_31).s44 = function (decoder) {
    var tmp0_desc = this.doj_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_31).eoj = function (encoder, value) {
    var tmp0_desc = this.doj_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.foj_1);
    tmp1_output.w49(tmp0_desc, 1, value.goj_1);
    tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.hoj_1);
    tmp1_output.w49(tmp0_desc, 3, value.ioj_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_31).r44 = function (encoder, value) {
    return this.eoj(encoder, value instanceof SubtitleTrack ? value : THROW_CCE());
  };
  var $serializer_instance_31;
  function $serializer_getInstance_43() {
    if ($serializer_instance_31 == null)
      new $serializer_31();
    return $serializer_instance_31;
  }
  function SubtitleTrack_init_$Init$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_43().doj_1);
    }
    $this.foj_1 = uri;
    $this.goj_1 = mimeType;
    $this.hoj_1 = langCode;
    $this.ioj_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.foj_1 = uri;
    this.goj_1 = mimeType;
    this.hoj_1 = langCode;
    this.ioj_1 = title;
  }
  protoOf(SubtitleTrack).joj = function (uri, mimeType, langCode, title) {
    return new SubtitleTrack(uri, mimeType, langCode, title);
  };
  protoOf(SubtitleTrack).koj = function (uri, mimeType, langCode, title, $super) {
    uri = uri === VOID ? this.foj_1 : uri;
    mimeType = mimeType === VOID ? this.goj_1 : mimeType;
    langCode = langCode === VOID ? this.hoj_1 : langCode;
    title = title === VOID ? this.ioj_1 : title;
    return $super === VOID ? this.joj(uri, mimeType, langCode, title) : $super.joj.call(this, uri, mimeType, langCode, title);
  };
  protoOf(SubtitleTrack).toString = function () {
    return 'SubtitleTrack(uri=' + this.foj_1 + ', mimeType=' + this.goj_1 + ', langCode=' + this.hoj_1 + ', title=' + this.ioj_1 + ')';
  };
  protoOf(SubtitleTrack).hashCode = function () {
    var result = getStringHashCode(this.foj_1);
    result = imul(result, 31) + getStringHashCode(this.goj_1) | 0;
    result = imul(result, 31) + (this.hoj_1 == null ? 0 : getStringHashCode(this.hoj_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.ioj_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.foj_1 === tmp0_other_with_cast.foj_1))
      return false;
    if (!(this.goj_1 === tmp0_other_with_cast.goj_1))
      return false;
    if (!(this.hoj_1 == tmp0_other_with_cast.hoj_1))
      return false;
    if (!(this.ioj_1 === tmp0_other_with_cast.ioj_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_33() {
    this.loj_1 = 'upload-tmp';
    this.moj_1 = 'upload-tmp:///';
  }
  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.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.noj_1 = tmp0_serialDesc;
  }
  protoOf($serializer_32).q44 = function () {
    return this.noj_1;
  };
  protoOf($serializer_32).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_32).s44 = function (decoder) {
    var tmp0_desc = this.noj_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_32).ooj = function (encoder, value) {
    var tmp0_desc = this.noj_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_3(), value.poj_1);
    tmp1_output.r49(tmp0_desc, 1, value.qoj_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.roj_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.roj_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.soj_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, $serializer_getInstance_4(), value.soj_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_32).r44 = function (encoder, value) {
    return this.ooj(encoder, value instanceof MetadataResult ? value : THROW_CCE());
  };
  var $serializer_instance_32;
  function $serializer_getInstance_44() {
    if ($serializer_instance_32 == null)
      new $serializer_32();
    return $serializer_instance_32;
  }
  function MetadataResult_init_$Init$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_44().noj_1);
    }
    $this.poj_1 = entry;
    $this.qoj_1 = importerId;
    if (0 === (seen1 & 4))
      $this.roj_1 = null;
    else
      $this.roj_1 = originalFilename;
    if (0 === (seen1 & 8))
      $this.soj_1 = null;
    else
      $this.soj_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.poj_1 = entry;
    this.qoj_1 = importerId;
    this.roj_1 = originalFilename;
    this.soj_1 = picture;
  }
  protoOf(MetadataResult).toString = function () {
    return 'MetadataResult(entry=' + this.poj_1 + ', importerId=' + this.qoj_1 + ', originalFilename=' + this.roj_1 + ', picture=' + this.soj_1 + ')';
  };
  protoOf(MetadataResult).hashCode = function () {
    var result = this.poj_1.hashCode();
    result = imul(result, 31) + this.qoj_1 | 0;
    result = imul(result, 31) + (this.roj_1 == null ? 0 : getStringHashCode(this.roj_1)) | 0;
    result = imul(result, 31) + (this.soj_1 == null ? 0 : this.soj_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.poj_1.equals(tmp0_other_with_cast.poj_1))
      return false;
    if (!(this.qoj_1 === tmp0_other_with_cast.qoj_1))
      return false;
    if (!(this.roj_1 == tmp0_other_with_cast.roj_1))
      return false;
    if (!equals(this.soj_1, tmp0_other_with_cast.soj_1))
      return false;
    return true;
  };
  function PersonConstants() {
    PersonConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(1, strings_getInstance().zml_1);
    var tmp_1 = to(2, strings_getInstance().yml_1);
    var tmp_2 = to(4, strings_getInstance().amm_1);
    tmp.toj_1 = mapOf([tmp_0, tmp_1, tmp_2, to(0, strings_getInstance().bmm_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().bni_1);
    var tmp_1 = to(4, strings_getInstance().lmo_1);
    var tmp_2 = to(1, strings_getInstance().cni_1);
    var tmp_3 = to(2, strings_getInstance().dni_1);
    tmp.uoj_1 = mapOf([tmp_0, tmp_1, tmp_2, tmp_3, to(3, strings_getInstance().tnb_1)]);
    var tmp_4 = this;
    Companion_getInstance_1();
    var tmp_5 = to(0, strings_getInstance().un6_1);
    Companion_getInstance_1();
    var tmp_6 = to(1, strings_getInstance().tn6_1);
    Companion_getInstance_1();
    tmp_4.voj_1 = mapOf([tmp_5, tmp_6, to(2, strings_getInstance().sn6_1)]);
  }
  var SubmissionConstants_instance;
  function SubmissionConstants_getInstance() {
    if (SubmissionConstants_instance == null)
      new SubmissionConstants();
    return SubmissionConstants_instance;
  }
  function TerminologyKeys() {
    TerminologyKeys_instance = this;
    this.woj_1 = 'Teacher';
    this.xoj_1 = 'Student';
    this.yoj_1 = 'Teachers';
    this.zoj_1 = 'Students';
    this.aok_1 = 'AddTeacher';
    this.bok_1 = 'AddStudent';
    this.cok_1 = mapOf([to('Teacher', strings_getInstance().bn0_1), to('Student', strings_getInstance().on6_1), to('Teachers', strings_getInstance().en0_1), to('Students', strings_getInstance().zmm_1), to('AddTeacher', strings_getInstance().cn0_1), to('AddStudent', strings_getInstance().amn_1)]);
  }
  var TerminologyKeys_instance;
  function TerminologyKeys_getInstance() {
    if (TerminologyKeys_instance == null)
      new TerminologyKeys();
    return TerminologyKeys_instance;
  }
  function $invokeCOROUTINE$11(_this__u8e3s4, destUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lok_1 = _this__u8e3s4;
    this.mok_1 = destUri;
  }
  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;
            this.hd_1 = 1;
            suspendResult = this.lok_1.rok_1.xk3_1.v7e().qho(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.nok_1 = suspendResult;
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp0_safe_receiver = this.lok_1.rok_1.yk3_1;
            tmp_0.pok_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v7e();
            if (this.pok_1 == null) {
              this.qok_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = this.pok_1.qho(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.qok_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            var tmp2_safe_receiver = this.qok_1;
            this.ook_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.chp_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.nok_1;
              tmp_2.ook_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.chp_1;
              this.hd_1 = 5;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 6;
            return this.ook_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.rok_1 = dataLayer;
  }
  protoOf(CheckRegistrationAllowedUseCase).sok = function (destUri, $completion) {
    var tmp = new $invokeCOROUTINE$11(this, destUri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function CreateNewLocalAccountUseCase(di) {
    this.tok_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.vok_1 = submission;
  }
  protoOf(SubmitAssignmentResult).toString = function () {
    return 'SubmitAssignmentResult(submission=' + this.vok_1 + ')';
  };
  protoOf(SubmitAssignmentResult).hashCode = function () {
    return this.vok_1 == null ? 0 : this.vok_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.vok_1, tmp0_other_with_cast.vok_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$12(_this__u8e3s4, repo, submitterUid, assignmentUid, accountPersonUid, submission, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.eol_1 = _this__u8e3s4;
    this.fol_1 = repo;
    this.gol_1 = submitterUid;
    this.hol_1 = assignmentUid;
    this.iol_1 = accountPersonUid;
    this.jol_1 = submission;
  }
  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 = 6;
            if (this.gol_1.equals(new Long(0, 0)))
              throw new AccountIsNotSubmitterException('Not a valid submitter');
            this.hd_1 = 1;
            suspendResult = this.fol_1.q7e().q7s(this.hol_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_0.lol_1 = tmp_1;
            var tmp_2 = this;
            var tmp1_elvis_lhs = this.lol_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.mol_1 = tmp_3;
            var tmp_4 = this;
            var tmp2_elvis_lhs = this.lol_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.nol_1 = tmp_5;
            var tmp_6 = this.nol_1.z7t_1;
            if (tmp_6 === 1) {
              this.hd_1 = 2;
              suspendResult = this.fol_1.r7e().sc1(this.iol_1, this.hol_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.ool_1 = false;
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.ool_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (this.ool_1) {
              throw new AssignmentAlreadySubmittedException(this.eol_1.qol_1.vol(strings_getInstance().unl_1));
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 4:
            if (lastPossibleSubmissionTime(this.mol_1).c7(systemTimeInMillis()) < 0) {
              throw new AssignmentDeadlinePassedException(this.eol_1.qol_1.vol(strings_getInstance().tnl_1));
            }

            if (this.nol_1.b7u_1) {
              var tmp_7 = this.nol_1.c7u_1;
              if (tmp_7 === 1) {
                var tmp3_safe_receiver = this.jol_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.nol_1.d7u_1) {
                  throw new AssignmentTextTooLongException(this.eol_1.qol_1.wol(strings_getInstance().vnl_1, [wordCount.toString(), this.nol_1.d7u_1.toString()]));
                }
              } else {
                var tmp_8 = this.nol_1.c7u_1;
                if (tmp_8 === 2) {
                  var tmp6_safe_receiver = this.jol_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.nol_1.d7u_1) {
                    throw new AssignmentTextTooLongException(this.eol_1.qol_1.wol(strings_getInstance().wnl_1, [charCount.toString(), this.nol_1.d7u_1.toString()]));
                  }
                }
              }
            }

            var tmp_9 = this;
            tmp_9.pol_1 = shallowCopy_0(this.jol_1, SubmitAssignmentUseCase$invoke$lambda(this.hol_1, this.gol_1, this.iol_1, this.nol_1));
            Napier_getInstance().i5e('SubmitAssignmentUseCase: save to repo for submitterUid=' + this.gol_1.toString() + ' assignmentUid=' + this.hol_1.toString());
            this.hd_1 = 5;
            suspendResult = this.fol_1.r7e().insertAsync(this.pol_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return new SubmitAssignmentResult(this.pol_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.qol_1 = systemImpl;
  }
  protoOf(SubmitAssignmentUseCase).xol = function (repo, submitterUid, assignmentUid, accountPersonUid, submission, $completion) {
    var tmp = new $invokeCOROUTINE$12(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.gom_1 = this$0;
    this.hom_1 = $stmt;
    this.iom_1 = $activeUserPerson;
    this.jom_1 = $courseBlock;
    this.kom_1 = $instructorActorToPersonUidMap;
    this.lom_1 = $actorToPersonUidMap;
    this.mom_1 = $clazzUid;
    this.nom_1 = $activityId;
    this.oom_1 = $markToRecord;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubmitMarkUseCase$invoke$slambda).rom = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.rom(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.qom_1 = uuid4();
            this.hd_1 = 1;
            var tmp_0 = listOf_0(this.hom_1);
            var tmp0_xseAccountPersonUid = this.iom_1.f96_1;
            var tmp1_xseAccountUsername = ensureNotNull(this.iom_1.g96_1);
            var tmp2_xseCbUid = this.jom_1.t7x_1;
            var tmp3_xseRegistrationHi = this.qom_1.cmf();
            var tmp4_xseRegistrationLo = this.qom_1.dmf();
            var tmp5_knownActorUidToPersonUids = this.gom_1.xom_1.r45(MapSerializer(serializer_1(Companion_getInstance_2()), serializer_1(Companion_getInstance_2())), plus_0(this.kom_1, this.lom_1));
            suspendResult = this.gom_1.vom_1.fon(tmp_0, new XapiSessionEntity(VOID, VOID, tmp3_xseRegistrationHi, tmp4_xseRegistrationLo, VOID, tmp0_xseAccountPersonUid, VOID, tmp1_xseAccountUsername, this.mom_1, tmp2_xseCbUid, VOID, VOID, this.nom_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.gom_1.som_1.t7e().insertAsync(this.oom_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).jo1 = function (it, completion) {
    var i = new SubmitMarkUseCase$invoke$slambda(this.gom_1, this.hom_1, this.iom_1, this.jom_1, this.kom_1, this.lom_1, this.mom_1, this.nom_1, this.oom_1, completion);
    i.pom_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.rom(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$13(_this__u8e3s4, activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.oon_1 = _this__u8e3s4;
    this.pon_1 = activeUserPerson;
    this.qon_1 = assignment;
    this.ron_1 = clazzUid;
    this.son_1 = submitterUid;
    this.ton_1 = draftMark;
    this.uon_1 = submissions;
    this.von_1 = courseBlock;
  }
  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 = 8;
            var tmp_0 = this;
            var tmp_1;
            if (!this.uon_1.c1()) {
              var iterator = this.uon_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.von_1.b7y_1) > 0;
            } else {
              tmp_1 = false;
            }

            tmp_0.won_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.oon_1.som_1.q7e().o7s(this.qon_1.n7t_1, this.ron_1, this.pon_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            if (tmp_2) {
              var tmp_4 = this;
              var activeUserPersonXapiAgent = toXapiAgent(this.pon_1, this.oon_1.tom_1);
              tmp_4.yon_1 = to(activeUserPersonXapiAgent, mapOf_0(to(identifierHash(activeUserPersonXapiAgent, this.oon_1.wom_1), this.pon_1.f96_1)));
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = this.oon_1.uom_1.roo(this.qon_1.q7t_1, this.xon_1.mb(), this.qon_1.f7u_1, this.qon_1.n7t_1, this.pon_1.f96_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.zon_1 = suspendResult;
            var tmp_5 = this;
            var it = this.zon_1;
            tmp_5.yon_1 = to(it.soo_1, it.too_1);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.aoo_1 = this.yon_1;
            this.boo_1 = this.aoo_1.y6();
            this.coo_1 = this.aoo_1.z6();
            if (this.qon_1.q7t_1.equals(new Long(0, 0))) {
              this.hd_1 = 5;
              suspendResult = this.oon_1.som_1.n7d().mg4(this.son_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.oon_1.uom_1.roo(this.qon_1.q7t_1, this.son_1.mb(), this.qon_1.f7u_1, this.qon_1.n7t_1, this.pon_1.f96_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.eoo_1 = suspendResult;
            var tmp_6 = this;
            var it_0 = this.eoo_1;
            tmp_6.doo_1 = to(it_0.soo_1, it_0.too_1);
            this.hd_1 = 6;
            continue $sm;
          case 5:
            this.foo_1 = suspendResult;
            this.goo_1 = this.foo_1 == null ? null : toXapiAgent(this.foo_1, this.oon_1.tom_1);
            var tmp_7 = this;
            var tmp_8;
            if (this.goo_1 == null) {
              throw IllegalStateException_init_$Create$('Could not find person for ' + this.son_1.toString());
            } else {
              tmp_8 = this.goo_1;
            }

            tmp_7.hoo_1 = tmp_8;
            this.doo_1 = to(this.hoo_1, mapOf_0(to(identifierHash(this.hoo_1, this.oon_1.wom_1), this.son_1)));
            this.hd_1 = 6;
            continue $sm;
          case 6:
            this.ioo_1 = this.doo_1;
            this.joo_1 = this.ioo_1.y6();
            this.koo_1 = this.ioo_1.z6();
            var tmp_9 = this;
            tmp_9.loo_1 = shallowCopy_1(this.ton_1, SubmitMarkUseCase$invoke$lambda(this.qon_1, this.son_1, this.xon_1, this.pon_1, this.von_1, this.ron_1, this.won_1));
            var tmp_10 = this;
            var tmp4_viewName = 'CourseAssignment';
            var tmp5_learningSpace = this.oon_1.tom_1.xnv_1;
            Companion_getInstance_126();
            var tmp_11 = to('clazzUid', this.ron_1.toString());
            Companion_getInstance_126();
            var tmp6_queryString = toQueryString(mapOf([tmp_11, to('entityUid', this.qon_1.n7t_1.toString())]));
            tmp_10.moo_1 = (new UstadUrlComponents(tmp5_learningSpace, tmp4_viewName, tmp6_queryString)).zoo();
            var tmp_12 = this;
            var tmp7_verb = new XapiVerb(get_VERB_COMPLETED());
            var tmp8_object = new XapiActivityStatementObject(XapiObjectType_Activity_getInstance(), this.moo_1);
            var tmp9_context = new XapiContext(this.boo_1);
            var tmp10_result = new XapiResult(true, true, new Score(this.loo_1.lbw_1 / this.loo_1.mbw_1, this.loo_1.lbw_1, 0.0, this.loo_1.mbw_1));
            tmp_12.noo_1 = new XapiStatement(VOID, this.joo_1, tmp7_verb, tmp8_object, tmp10_result, tmp9_context);
            this.hd_1 = 7;
            suspendResult = withDoorTransactionAsync(this.oon_1.som_1, VOID, SubmitMarkUseCase$invoke$slambda_0(this.oon_1, this.noo_1, this.pon_1, this.von_1, this.coo_1, this.koo_1, this.ron_1, this.moo_1, this.loo_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.som_1 = repo;
    this.tom_1 = learningSpace;
    this.uom_1 = createXapiGroupUseCase;
    this.vom_1 = xapiStatementResource;
    this.wom_1 = xxStringHasher;
    this.xom_1 = json;
  }
  protoOf(SubmitMarkUseCase).aop = function (activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, $completion) {
    var tmp = new $invokeCOROUTINE$13(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.jop_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).oop = function (value, $completion) {
    var tmp = this.pop(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.oop((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.mop_1 = this.jop_1;
            var tmp_1 = this;
            tmp_1.nop_1 = this.kop_1;
            var tmp0_safe_receiver = this.nop_1;
            if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zg8_1) == null)) {
              this.hd_1 = 3;
              suspendResult = this.mop_1.t1d(this.nop_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.lop_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).pop = function (value, completion) {
    var i = new GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda(this.jop_1, completion);
    i.kop_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.oop(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$15(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.yop_1 = _this__u8e3s4;
    this.zop_1 = collector;
  }
  protoOf($collectCOROUTINE$15).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.aoq_1 = this.zop_1;
            this.hd_1 = 1;
            var tmp_1 = GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda_0(this.aoq_1, null);
            suspendResult = this.yop_1.boq_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.coq_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_0).t1d = function (value, $completion) {
    return this.coq_1(value, $completion);
  };
  function _no_name_provided__qut3iv($this) {
    this.boq_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv).doq = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$15(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.doq(collector, $completion);
  };
  function $invokeCOROUTINE$14(_this__u8e3s4, submitterUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.moq_1 = _this__u8e3s4;
    this.noq_1 = submitterUid;
  }
  protoOf($invokeCOROUTINE$14).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.noq_1.c7(toLong(10000)) < 0) {
              var tmp_0 = this;
              tmp_0.ooq_1 = this.moq_1.qoq_1.vol(strings_getInstance().inh_1) + ' ' + this.noq_1.toString();
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var this_0 = this.moq_1.poq_1.n7d().qg4(this.noq_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.ooq_1 = '' + tmp_2 + ' ' + (it == null ? null : it.ag9_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.ooq_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.poq_1 = repo;
    this.qoq_1 = systemImpl;
  }
  protoOf(GetAssignmentSubmitterNameUseCase).roq = function (submitterUid, $completion) {
    var tmp = new $invokeCOROUTINE$14(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.soq_1 = blobUrl;
    this.toq_1 = transferJobItemUid;
    this.uoq_1 = lockIdToRelease;
    this.voq_1 = estimatedSize;
    this.woq_1 = partialResponseFile;
  }
  protoOf(BlobTransferJobItem).toString = function () {
    return 'BlobTransferJobItem(blobUrl=' + this.soq_1 + ', transferJobItemUid=' + this.toq_1 + ', lockIdToRelease=' + this.uoq_1.toString() + ', estimatedSize=' + toString_0(this.voq_1) + ', partialResponseFile=' + this.woq_1 + ')';
  };
  protoOf(BlobTransferJobItem).hashCode = function () {
    var result = getStringHashCode(this.soq_1);
    result = imul(result, 31) + this.toq_1 | 0;
    result = imul(result, 31) + this.uoq_1.hashCode() | 0;
    result = imul(result, 31) + (this.voq_1 == null ? 0 : this.voq_1.hashCode()) | 0;
    result = imul(result, 31) + (this.woq_1 == null ? 0 : getStringHashCode(this.woq_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.soq_1 === tmp0_other_with_cast.soq_1))
      return false;
    if (!(this.toq_1 === tmp0_other_with_cast.toq_1))
      return false;
    if (!this.uoq_1.equals(tmp0_other_with_cast.uoq_1))
      return false;
    if (!equals(this.voq_1, tmp0_other_with_cast.voq_1))
      return false;
    if (!(this.woq_1 == tmp0_other_with_cast.woq_1))
      return false;
    return true;
  };
  function BlobTransferProgressUpdate(transferItem, bytesTransferred) {
    this.xoq_1 = transferItem;
    this.yoq_1 = bytesTransferred;
  }
  protoOf(BlobTransferProgressUpdate).toString = function () {
    return 'Uid #' + this.xoq_1.toq_1 + ' transferred=' + this.yoq_1.toString() + ' bytes';
  };
  protoOf(BlobTransferProgressUpdate).hashCode = function () {
    var result = this.xoq_1.hashCode();
    result = imul(result, 31) + this.yoq_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.xoq_1.equals(tmp0_other_with_cast.xoq_1))
      return false;
    if (!this.yoq_1.equals(tmp0_other_with_cast.yoq_1))
      return false;
    return true;
  };
  function BlobTransferStatusUpdate(transferItem, status) {
    this.zoq_1 = transferItem;
    this.aor_1 = status;
  }
  protoOf(BlobTransferStatusUpdate).toString = function () {
    return 'BlobTransferStatusUpdate(transferItem=' + this.zoq_1 + ', status=' + this.aor_1 + ')';
  };
  protoOf(BlobTransferStatusUpdate).hashCode = function () {
    var result = this.zoq_1.hashCode();
    result = imul(result, 31) + this.aor_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.zoq_1.equals(tmp0_other_with_cast.zoq_1))
      return false;
    if (!(this.aor_1 === tmp0_other_with_cast.aor_1))
      return false;
    return true;
  };
  function CancelDownloadUseCase() {
  }
  function MakeContentEntryAvailableOfflineUseCase(repo, nodeIdAndAuth, enqueueContentManifestDownloadUseCase) {
    this.bor_1 = repo;
    this.cor_1 = nodeIdAndAuth;
    this.dor_1 = enqueueContentManifestDownloadUseCase;
  }
  function OpenBlobItem(uri, mimeType, fileName, fileSize) {
    this.eor_1 = uri;
    this.for_1 = mimeType;
    this.gor_1 = fileName;
    this.hor_1 = fileSize;
  }
  protoOf(OpenBlobItem).toString = function () {
    return 'OpenBlobItem(uri=' + this.eor_1 + ', mimeType=' + this.for_1 + ', fileName=' + this.gor_1 + ', fileSize=' + this.hor_1.toString() + ')';
  };
  protoOf(OpenBlobItem).hashCode = function () {
    var result = getStringHashCode(this.eor_1);
    result = imul(result, 31) + getStringHashCode(this.for_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.gor_1) | 0;
    result = imul(result, 31) + this.hor_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.eor_1 === tmp0_other_with_cast.eor_1))
      return false;
    if (!(this.for_1 === tmp0_other_with_cast.for_1))
      return false;
    if (!(this.gor_1 === tmp0_other_with_cast.gor_1))
      return false;
    if (!this.hor_1.equals(tmp0_other_with_cast.hor_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.qor_1 = _this__u8e3s4;
    this.ror_1 = openItem;
    this.sor_1 = onUiUpdate;
    this.tor_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.sor_1(new OpeningBlobState(this.ror_1, new Long(0, 0), new Long(0, 0)));
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.qor_1.uor_1.wor(this.ror_1, OpenBlobUiUseCase$invoke$lambda(this.sor_1, this.ror_1), this.tor_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.sor_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.ror_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.sor_1(new OpeningBlobState(this.ror_1, tmp_1, tmp_2, tmp0_elvis_lhs == null ? this.qor_1.vor_1.vol(strings_getInstance().xmj_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.uor_1 = openBlobUseCase;
    this.vor_1 = systemImpl;
  }
  protoOf(OpenBlobUiUseCase).xor = 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.yor_1 = item;
    this.zor_1 = bytesReady;
    this.aos_1 = totalBytes;
    this.bos_1 = error;
  }
  protoOf(OpeningBlobState).toString = function () {
    return 'OpeningBlobState(item=' + this.yor_1 + ', bytesReady=' + this.zor_1.toString() + ', totalBytes=' + this.aos_1.toString() + ', error=' + this.bos_1 + ')';
  };
  protoOf(OpeningBlobState).hashCode = function () {
    var result = this.yor_1.hashCode();
    result = imul(result, 31) + this.zor_1.hashCode() | 0;
    result = imul(result, 31) + this.aos_1.hashCode() | 0;
    result = imul(result, 31) + (this.bos_1 == null ? 0 : getStringHashCode(this.bos_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.yor_1.equals(tmp0_other_with_cast.yor_1))
      return false;
    if (!this.zor_1.equals(tmp0_other_with_cast.zor_1))
      return false;
    if (!this.aos_1.equals(tmp0_other_with_cast.aos_1))
      return false;
    if (!(this.bos_1 == tmp0_other_with_cast.bos_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.kos_1 = $blobs;
    this.los_1 = $this_updateUris;
    this.mos_1 = $timeNow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).io1 = function (_anonymous_parameter_0__qggqh8, $completion) {
    var tmp = this.jo1(_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.io1(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.oos_1 = this.kos_1;
            this.pos_1 = this.oos_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.pos_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.qos_1 = this.pos_1.e();
            var tmp_1 = this;
            tmp_1.ros_1 = this.qos_1;
            this.sos_1 = this.ros_1.uos_1;
            if (this.sos_1 === 90) {
              this.hd_1 = 2;
              suspendResult = this.los_1.s7e().dca(this.ros_1.tos_1, this.ros_1.wos_1, this.mos_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).jo1 = function (_anonymous_parameter_0__qggqh8, completion) {
    var i = new SaveAndUploadLocalUrisUseCase$updateUris$slambda(this.kos_1, this.los_1, this.mos_1, completion);
    i.nos_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.io1(_anonymous_parameter_0__qggqh8, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$18(_this__u8e3s4, localUrisToSave, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.jot_1 = _this__u8e3s4;
    this.kot_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.jot_1.not_1.rot(this.kot_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.lot_1 = suspendResult;
            this.mot_1 = this.jot_1.oot_1;
            if (!(this.mot_1 == null)) {
              this.hd_1 = 3;
              suspendResult = updateUris(this.jot_1.pot_1, this.jot_1, this.lot_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              var tmp0_elvis_lhs = this.jot_1.qot_1;
              suspendResult = updateUris(tmp0_elvis_lhs == null ? this.jot_1.pot_1 : tmp0_elvis_lhs, this.jot_1, this.lot_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.lot_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.wos_1;
              var tmp1_entityUid = item.tos_1;
              var tmp2_tableId = item.uos_1;
              var tmp3_retentionLockIdToRelease = item.xos_1;
              destination.i1(new EnqueueBlobUploadItem(tmp0_blobUrl, tmp2_tableId, tmp1_entityUid, tmp3_retentionLockIdToRelease));
            }

            suspendResult = this.mot_1.sot(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.not_1 = saveLocalUrisAsBlobsUseCase;
    this.oot_1 = enqueueBlobUploadClientUseCase;
    this.pot_1 = activeDb;
    this.qot_1 = activeRepo;
  }
  protoOf(SaveAndUploadLocalUrisUseCase).tot = 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_34() {
  }
  protoOf(Companion_34).n4r = function () {
    return $serializer_getInstance_45();
  };
  var Companion_instance_83;
  function Companion_getInstance_51() {
    return Companion_instance_83;
  }
  function $serializer_33() {
    $serializer_instance_33 = 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.uot_1 = tmp0_serialDesc;
  }
  protoOf($serializer_33).q44 = function () {
    return this.uot_1;
  };
  protoOf($serializer_33).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_33).s44 = function (decoder) {
    var tmp0_desc = this.uot_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_33).vot = function (encoder, value) {
    var tmp0_desc = this.uot_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.s49(tmp0_desc, 0, value.tos_1);
    tmp1_output.r49(tmp0_desc, 1, value.uos_1);
    tmp1_output.w49(tmp0_desc, 2, value.vos_1);
    tmp1_output.w49(tmp0_desc, 3, value.wos_1);
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !value.xos_1.equals(new Long(0, 0))) {
      tmp1_output.s49(tmp0_desc, 4, value.xos_1);
    }
    tmp1_output.w49(tmp0_desc, 5, value.yos_1);
    tmp1_output.w49(tmp0_desc, 6, value.zos_1);
    tmp1_output.s49(tmp0_desc, 7, value.aot_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_33).r44 = function (encoder, value) {
    return this.vot(encoder, value instanceof SavedBlob ? value : THROW_CCE());
  };
  var $serializer_instance_33;
  function $serializer_getInstance_45() {
    if ($serializer_instance_33 == null)
      new $serializer_33();
    return $serializer_instance_33;
  }
  function SavedBlob_init_$Init$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker, $this) {
    if (!(239 === (239 & seen1))) {
      throwMissingFieldException(seen1, 239, $serializer_getInstance_45().uot_1);
    }
    $this.tos_1 = entityUid;
    $this.uos_1 = tableId;
    $this.vos_1 = localUri;
    $this.wos_1 = blobUrl;
    if (0 === (seen1 & 16))
      $this.xos_1 = new Long(0, 0);
    else
      $this.xos_1 = retentionLockId;
    $this.yos_1 = integrity;
    $this.zos_1 = mimeType;
    $this.aot_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_140.b4e() : extraHeaders;
    this.wot_1 = localUri;
    this.xot_1 = entityUid;
    this.yot_1 = tableId;
    this.zot_1 = mimeType;
    this.aou_1 = deleteLocalUriAfterSave;
    this.bou_1 = createRetentionLock;
    this.cou_1 = extraHeaders;
  }
  protoOf(SaveLocalUriAsBlobItem).toString = function () {
    return 'SaveLocalUriAsBlobItem(localUri=' + this.wot_1 + ', entityUid=' + this.xot_1.toString() + ', tableId=' + this.yot_1 + ', mimeType=' + this.zot_1 + ', deleteLocalUriAfterSave=' + this.aou_1 + ', createRetentionLock=' + this.bou_1 + ', extraHeaders=' + this.cou_1 + ')';
  };
  protoOf(SaveLocalUriAsBlobItem).hashCode = function () {
    var result = getStringHashCode(this.wot_1);
    result = imul(result, 31) + this.xot_1.hashCode() | 0;
    result = imul(result, 31) + this.yot_1 | 0;
    result = imul(result, 31) + (this.zot_1 == null ? 0 : getStringHashCode(this.zot_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.aou_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bou_1) | 0;
    result = imul(result, 31) + hashCode(this.cou_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.wot_1 === tmp0_other_with_cast.wot_1))
      return false;
    if (!this.xot_1.equals(tmp0_other_with_cast.xot_1))
      return false;
    if (!(this.yot_1 === tmp0_other_with_cast.yot_1))
      return false;
    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 === tmp0_other_with_cast.bou_1))
      return false;
    if (!equals(this.cou_1, tmp0_other_with_cast.cou_1))
      return false;
    return true;
  };
  function SavedBlob(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) {
    retentionLockId = retentionLockId === VOID ? new Long(0, 0) : retentionLockId;
    this.tos_1 = entityUid;
    this.uos_1 = tableId;
    this.vos_1 = localUri;
    this.wos_1 = blobUrl;
    this.xos_1 = retentionLockId;
    this.yos_1 = integrity;
    this.zos_1 = mimeType;
    this.aot_1 = storageSize;
  }
  protoOf(SavedBlob).dou = function (entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) {
    return new SavedBlob(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize);
  };
  protoOf(SavedBlob).eou = function (entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, $super) {
    entityUid = entityUid === VOID ? this.tos_1 : entityUid;
    tableId = tableId === VOID ? this.uos_1 : tableId;
    localUri = localUri === VOID ? this.vos_1 : localUri;
    blobUrl = blobUrl === VOID ? this.wos_1 : blobUrl;
    retentionLockId = retentionLockId === VOID ? this.xos_1 : retentionLockId;
    integrity = integrity === VOID ? this.yos_1 : integrity;
    mimeType = mimeType === VOID ? this.zos_1 : mimeType;
    storageSize = storageSize === VOID ? this.aot_1 : storageSize;
    return $super === VOID ? this.dou(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) : $super.dou.call(this, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize);
  };
  protoOf(SavedBlob).toString = function () {
    return 'SavedBlob(entityUid=' + this.tos_1.toString() + ', tableId=' + this.uos_1 + ', localUri=' + this.vos_1 + ', blobUrl=' + this.wos_1 + ', retentionLockId=' + this.xos_1.toString() + ', integrity=' + this.yos_1 + ', mimeType=' + this.zos_1 + ', storageSize=' + this.aot_1.toString() + ')';
  };
  protoOf(SavedBlob).hashCode = function () {
    var result = this.tos_1.hashCode();
    result = imul(result, 31) + this.uos_1 | 0;
    result = imul(result, 31) + getStringHashCode(this.vos_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.wos_1) | 0;
    result = imul(result, 31) + this.xos_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.yos_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.zos_1) | 0;
    result = imul(result, 31) + this.aot_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.tos_1.equals(tmp0_other_with_cast.tos_1))
      return false;
    if (!(this.uos_1 === tmp0_other_with_cast.uos_1))
      return false;
    if (!(this.vos_1 === tmp0_other_with_cast.vos_1))
      return false;
    if (!(this.wos_1 === tmp0_other_with_cast.wos_1))
      return false;
    if (!this.xos_1.equals(tmp0_other_with_cast.xos_1))
      return false;
    if (!(this.yos_1 === tmp0_other_with_cast.yos_1))
      return false;
    if (!(this.zos_1 === tmp0_other_with_cast.zos_1))
      return false;
    if (!this.aot_1.equals(tmp0_other_with_cast.aot_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_35() {
    this.hou_1 = 160;
  }
  var Companion_instance_84;
  function Companion_getInstance_52() {
    return Companion_instance_84;
  }
  function $invokeCOROUTINE$19(_this__u8e3s4, entityUid, tableId, pictureUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.qou_1 = _this__u8e3s4;
    this.rou_1 = entityUid;
    this.sou_1 = tableId;
    this.tou_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.tou_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.uou_1 = Companion_getInstance_3().o2r(this.tou_1);
              this.vou_1 = this.qou_1.cow_1;
              if (this.vou_1 == null) {
                this.wou_1 = null;
                this.hd_1 = 4;
                continue $sm;
              } else {
                this.hd_1 = 3;
                suspendResult = getLocalUriIfRemote(this.vou_1, this.uou_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            } else {
              var tmp_2 = this;
              var tmp12_elvis_lhs = this.qou_1.zov_1;
              tmp_2.xou_1 = imageDaoForTable(tmp12_elvis_lhs == null ? this.qou_1.yov_1 : tmp12_elvis_lhs, this.qou_1, this.sou_1);
              if (this.xou_1 == null) {
                this.you_1 = null;
                this.hd_1 = 2;
                continue $sm;
              } else {
                this.hd_1 = 1;
                suspendResult = this.xou_1.ubi(this.rou_1, null, null, systemTimeInMillis(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 1:
            var tmp_3 = this;
            tmp_3.you_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.hd_1 = 20;
            continue $sm;
          case 3:
            this.wou_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.zou_1 = this.wou_1;
            this.aov_1 = this.zou_1 == null ? this.uou_1 : this.zou_1;
            this.hd_1 = 5;
            suspendResult = this.qou_1.aow_1.dow(this.aov_1.toString(), VOID, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.bov_1 = suspendResult;
            this.hd_1 = 6;
            suspendResult = this.qou_1.aow_1.dow(this.aov_1.toString(), VOID, new CompressParams(160, 160), VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.cov_1 = suspendResult;
            this.dov_1 = this.qou_1.wov_1;
            var tmp_4 = this;
            tmp_4.eov_1 = ArrayList_init_$Create$();
            var tmp_5 = this;
            tmp_5.fov_1 = this.eov_1;
            if (this.bov_1 == null)
              null;
            else {
              this.fov_1.i1(new SaveLocalUriAsBlobItem(this.bov_1.eow_1, this.rou_1, this.sou_1, this.bov_1.fow_1, true, true));
            }

            if (this.cov_1 == null)
              null;
            else {
              this.fov_1.i1(new SaveLocalUriAsBlobItem(this.cov_1.eow_1, this.rou_1, this.sou_1, this.cov_1.fow_1, true, true));
            }

            if (this.bov_1 == null ? true : this.cov_1 == null) {
              this.hd_1 = 7;
              suspendResult = isRemote(this.uou_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.gov_1 = false;
              this.hd_1 = 8;
              continue $sm;
            }

          case 7:
            this.hov_1 = suspendResult;
            this.gov_1 = !this.hov_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            this.iov_1 = this.gov_1;
            if (this.iov_1) {
              this.fov_1.i1(new SaveLocalUriAsBlobItem(this.tou_1, this.rou_1, this.sou_1, VOID, VOID, true));
            }

            this.jov_1 = this.eov_1;
            this.kov_1 = this.jov_1.f3();
            this.hd_1 = 9;
            suspendResult = this.dov_1.rot(this.kov_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            this.lov_1 = suspendResult;
            this.hd_1 = 10;
            suspendResult = this.qou_1.bow_1.iow(listOf_0(this.tou_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.lov_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.vos_1 === this.tou_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.wos_1;
            tmp_6.mov_1 = tmp4_elvis_lhs == null ? this.uou_1.toString() : tmp4_elvis_lhs;
            var tmp_7 = this;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp0_iterator_0 = this.lov_1.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                var tmp0_safe_receiver_0 = this.bov_1;
                if (element_0.vos_1 === (tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.eow_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.wos_1;
            tmp_7.nov_1 = tmp6_elvis_lhs == null ? this.mov_1 : tmp6_elvis_lhs;
            var tmp_8 = this;
            var tmp$ret$4;
            l$ret$5: do {
              var tmp0_iterator_1 = this.lov_1.w();
              while (tmp0_iterator_1.f()) {
                var element_1 = tmp0_iterator_1.e();
                var tmp0_safe_receiver_1 = this.cov_1;
                if (element_1.vos_1 === (tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.eow_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.wos_1;
            tmp_8.oov_1 = tmp8_elvis_lhs == null ? this.mov_1 : tmp8_elvis_lhs;
            if (!(this.qou_1.xov_1 == null)) {
              if (this.bov_1 == null ? true : this.cov_1 == null) {
                this.hd_1 = 13;
                suspendResult = isRemote(this.uou_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.qov_1 = false;
                this.hd_1 = 14;
                continue $sm;
              }
            } else {
              var tmp_9 = this;
              var tmp10_elvis_lhs = this.qou_1.zov_1;
              tmp_9.rov_1 = imageDaoForTable(tmp10_elvis_lhs == null ? this.qou_1.yov_1 : tmp10_elvis_lhs, this.qou_1, this.sou_1);
              if (this.rov_1 == null) {
                this.sov_1 = null;
                this.hd_1 = 12;
                continue $sm;
              } else {
                this.hd_1 = 11;
                suspendResult = this.rov_1.ubi(this.rou_1, this.nov_1, this.oov_1, systemTimeInMillis(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 11:
            var tmp_10 = this;
            tmp_10.sov_1 = Unit_instance;
            this.hd_1 = 12;
            continue $sm;
          case 12:
            this.hd_1 = 19;
            continue $sm;
          case 13:
            this.qov_1 = suspendResult;
            this.hd_1 = 14;
            continue $sm;
          case 14:
            if (this.qov_1) {
              var tmp_11 = this;
              tmp_11.pov_1 = new EnqueueBlobUploadItem(this.uou_1.toString(), this.sou_1, this.rou_1, new Long(0, 0));
              this.hd_1 = 15;
              continue $sm;
            } else {
              var tmp_12 = this;
              tmp_12.pov_1 = null;
              this.hd_1 = 15;
              continue $sm;
            }

          case 15:
            this.tov_1 = this.pov_1;
            this.uov_1 = imageDaoForTable(this.qou_1.yov_1, this.qou_1, this.sou_1);
            if (this.uov_1 == null) {
              this.vov_1 = null;
              this.hd_1 = 17;
              continue $sm;
            } else {
              this.hd_1 = 16;
              suspendResult = this.uov_1.ubi(this.rou_1, this.nov_1, this.oov_1, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 16:
            var tmp_13 = this;
            tmp_13.vov_1 = Unit_instance;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            Napier_getInstance().i5e('SavePictureUseCase: Set picture url = ' + this.nov_1 + ' on entity=' + this.rou_1.toString() + ' table=' + this.sou_1);
            this.hd_1 = 18;
            var this_0 = this.lov_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.wos_1, this.sou_1, this.rou_1, item.xos_1));
            }

            var this_1 = listOf_0(this.tov_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.qou_1.xov_1.sot(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.wov_1 = saveLocalUrisAsBlobUseCase;
    this.xov_1 = enqueueBlobUploadClientUseCase;
    this.yov_1 = db;
    this.zov_1 = repo;
    this.aow_1 = compressImageUseCase;
    this.bow_1 = deleteUrisUseCase;
    this.cow_1 = getStoragePathForUrlUseCase;
  }
  protoOf(SavePictureUseCase).gou = 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.row_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.sow_1)) {
              this.hd_1 = 4;
              continue $sm;
            }

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

            continue $sm;
          case 2:
            this.hd_1 = 3;
            suspendResult = this.row_1.aox(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.row_1, completion);
    i.sow_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.jox_1 = $progressUpdatesToCommit;
    this.kox_1 = this$0;
    this.lox_1 = $statusUpdatesToCommit;
    this.mox_1 = $repoNodeId;
    this.nox_1 = $updateTransferJobStatusUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TransferJobItemStatusUpdater$commit$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater$commit$slambda).he = function (p1, $completion) {
    return this.io1(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.pox_1 = this.jox_1;
            this.qox_1 = this.pox_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.qox_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.rox_1 = this.qox_1.e();
            var tmp_1 = this;
            tmp_1.sox_1 = this.rox_1;
            this.hd_1 = 2;
            suspendResult = this.kox_1.tow_1.k7f().aig(this.sox_1.xoq_1.toq_1, this.sox_1.yoq_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.tox_1 = this.lox_1;
            this.uox_1 = this.tox_1.w();
            this.hd_1 = 4;
            continue $sm;
          case 4:
            if (!this.uox_1.f()) {
              this.hd_1 = 8;
              continue $sm;
            }

            this.vox_1 = this.uox_1.e();
            var tmp_3 = this;
            tmp_3.wox_1 = this.vox_1;
            this.hd_1 = 5;
            suspendResult = this.kox_1.tow_1.k7f().big(this.wox_1.zoq_1.toq_1, this.wox_1.aor_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            if (this.wox_1.aor_1 === TransferJobItemStatus_COMPLETE_getInstance().vkc_1 ? !(this.mox_1 == null) : false) {
              this.hd_1 = 6;
              suspendResult = this.kox_1.tow_1.k7f().cig(this.mox_1, this.wox_1.zoq_1.toq_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.nox_1 === 0)) {
              this.hd_1 = 9;
              suspendResult = this.kox_1.tow_1.j7f().qid(this.nox_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.nox_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).jo1 = function (it, completion) {
    var i = new TransferJobItemStatusUpdater$commit$slambda(this.jox_1, this.kox_1, this.lox_1, this.mox_1, this.nox_1, completion);
    i.oox_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $commitCOROUTINE$20(_this__u8e3s4, updateTransferJobStatusUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.foy_1 = _this__u8e3s4;
    this.goy_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.hoy_1 = this.foy_1.xow_1.atomicfu$getAndSet(emptyList());
            this.ioy_1 = this.foy_1.yow_1.atomicfu$getAndSet(emptyList());
            var tmp_0 = this;
            var this_0 = this.hoy_1;
            var map = LinkedHashMap_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var key = element.xoq_1.toq_1;
              map.s(key, element);
            }

            tmp_0.joy_1 = toList(map.p2());
            var tmp_1 = this;
            var this_1 = this.ioy_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.zoq_1.toq_1;
              map_0.s(key_0, element_0);
            }

            tmp_1.koy_1 = toList(map_0.p2());
            var tmp_2 = this;
            var tmp_3 = this.foy_1.uow_1;
            var tmp0_safe_receiver = (!(tmp_3 == null) ? isInterface(tmp_3, DoorDatabaseRepository) : false) ? tmp_3 : null;
            tmp_2.loy_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m61();
            var tmp_4 = this;
            var this_2 = this.foy_1.tow_1;
            var tmp_5;
            var tmp_6;
            var tmp_7;
            if (!this.joy_1.c1()) {
              tmp_7 = true;
            } else {
              tmp_7 = !this.koy_1.c1();
            }

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

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

            tmp_4.moy_1 = tmp_5;
            if (this.moy_1 == null) {
              this.noy_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = withDoorTransactionAsync(this.moy_1, VOID, TransferJobItemStatusUpdater$commit$slambda_0(this.joy_1, this.foy_1, this.koy_1, this.loy_1, this.goy_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_8 = this;
            tmp_8.noy_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.woy_1 = _this__u8e3s4;
    this.xoy_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.woy_1.wow_1.atomicfu$getAndSet(true)) {
              this.woy_1.zow_1.mr();
              this.hd_1 = 1;
              suspendResult = this.woy_1.yoy(this.xoy_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.tow_1 = db;
    this.uow_1 = repo;
    this.vow_1 = commitInterval;
    this.wow_1 = atomic$boolean$1(false);
    this.xow_1 = atomic$ref$1(emptyList());
    this.yow_1 = atomic$ref$1(emptyList());
    var tmp = this;
    tmp.zow_1 = launch(scope, VOID, VOID, TransferJobItemStatusUpdater$updateJob$slambda_0(this, null));
  }
  protoOf(TransferJobItemStatusUpdater).zoy = function (update) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.xow_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).aoz = function (update) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.yow_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).yoy = 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).aox = function (updateTransferJobStatusUid, $completion, $super) {
    updateTransferJobStatusUid = updateTransferJobStatusUid === VOID ? 0 : updateTransferJobStatusUid;
    return $super === VOID ? this.yoy(updateTransferJobStatusUid, $completion) : $super.yoy.call(this, updateTransferJobStatusUid, $completion);
  };
  protoOf(TransferJobItemStatusUpdater).boz = 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).coz = function (updateTransferJobStatusUid, $completion, $super) {
    updateTransferJobStatusUid = updateTransferJobStatusUid === VOID ? 0 : updateTransferJobStatusUid;
    return $super === VOID ? this.boz(updateTransferJobStatusUid, $completion) : $super.boz.call(this, updateTransferJobStatusUid, $completion);
  };
  function $invokeCOROUTINE$22(_this__u8e3s4, db, tableId, entityUid, transferJobItemUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.loz_1 = _this__u8e3s4;
    this.moz_1 = db;
    this.noz_1 = tableId;
    this.ooz_1 = entityUid;
    this.poz_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.qoz_1 = this.noz_1;
            if (this.qoz_1 === 50) {
              this.hd_1 = 2;
              suspendResult = this.moz_1.f7e().ibq(this.ooz_1, this.poz_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (this.qoz_1 === 738) {
                this.hd_1 = 1;
                suspendResult = this.moz_1.i7f().ibq(this.ooz_1, this.poz_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).roz = 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_36() {
    this.soz_1 = 'X-Blob-Response-';
    this.toz_1 = 'Blob-Upload-Batch-Uuid';
  }
  var Companion_instance_85;
  function Companion_getInstance_53() {
    return Companion_instance_85;
  }
  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.uoz_1 = blobUrl;
    this.voz_1 = tableId;
    this.woz_1 = entityUid;
    this.xoz_1 = retentionLockIdToRelease;
  }
  protoOf(EnqueueBlobUploadItem).toString = function () {
    return 'EnqueueBlobUploadItem(blobUrl=' + this.uoz_1 + ', tableId=' + this.voz_1 + ', entityUid=' + this.woz_1.toString() + ', retentionLockIdToRelease=' + this.xoz_1.toString() + ')';
  };
  protoOf(EnqueueBlobUploadItem).hashCode = function () {
    var result = getStringHashCode(this.uoz_1);
    result = imul(result, 31) + this.voz_1 | 0;
    result = imul(result, 31) + this.woz_1.hashCode() | 0;
    result = imul(result, 31) + this.xoz_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.uoz_1 === tmp0_other_with_cast.uoz_1))
      return false;
    if (!(this.voz_1 === tmp0_other_with_cast.voz_1))
      return false;
    if (!this.woz_1.equals(tmp0_other_with_cast.woz_1))
      return false;
    if (!this.xoz_1.equals(tmp0_other_with_cast.xoz_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.hp0_1 = _this__u8e3s4;
    this.ip0_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.ip0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (suspendResult) {
              this.kp0_1 = Companion_getInstance_3();
              this.hd_1 = 2;
              suspendResult = this.hp0_1.lp0(this.ip0_1.toString(), VOID, VOID, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_0 = this;
              tmp_0.jp0_1 = this.ip0_1;
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            var ARGUMENT = suspendResult;
            var ARGUMENT_0 = ARGUMENT.mp0_1;
            this.jp0_1 = this.kp0_1.o2r(ARGUMENT_0);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.jp0_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.xp0_1 = $clazz;
    this.yp0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CreateNewClazzUseCase$invoke$slambda).rom = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.rom(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.xp0_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.yp0_1.bp1_1.o7d().insertAsync(this.xp0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ap1_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_2 = this.yp0_1.bp1_1.o7f();
            var tmp_3 = this.xp0_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.yp0_1.bp1_1.o7f();
            var tmp_5 = this.xp0_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.ap1_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).jo1 = function (it, completion) {
    var i = new CreateNewClazzUseCase$invoke$slambda(this.xp0_1, this.yp0_1, completion);
    i.zp0_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.rom(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CreateNewClazzUseCase(repoOrDb) {
    this.bp1_1 = repoOrDb;
  }
  protoOf(CreateNewClazzUseCase).cp1 = function (clazz, $completion) {
    return withDoorTransactionAsync(this.bp1_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.lp1_1 = $approved;
    this.mp1_1 = this$0;
    this.np1_1 = $enrolmentRequest;
    this.op1_1 = $effectiveClazz;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.io1(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.lp1_1) {
              this.hd_1 = 1;
              var tmp_0 = this.np1_1.ley_1;
              var tmp_1 = this.np1_1.ney_1;
              var tmp_2 = ClazzEnrolment_init_$Create$(tmp_0, tmp_1, 1000);
              var tmp0_elvis_lhs = this.op1_1.j8e_1;
              suspendResult = this.mp1_1.up1_1.xp1(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.qp1_1 = 3;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var tmp_4 = this;
            tmp_4.qp1_1 = 2;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.rp1_1 = this.qp1_1;
            this.hd_1 = 3;
            var tmp1_elvis_lhs = this.mp1_1.tp1_1;
            suspendResult = (tmp1_elvis_lhs == null ? this.mp1_1.sp1_1 : tmp1_elvis_lhs).n7f().uex(this.np1_1.key_1, this.rp1_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).jo1 = function (it, completion) {
    var i = new ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda(this.lp1_1, this.mp1_1, this.np1_1, this.op1_1, completion);
    i.pp1_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$24(_this__u8e3s4, enrolmentRequest, approved, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.gp2_1 = _this__u8e3s4;
    this.hp2_1 = enrolmentRequest;
    this.ip2_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.gp2_1.sp1_1.o7d().s8c(this.hp2_1.ley_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_0.kp2_1 = tmp_1;
            this.hd_1 = 2;
            var tmp1_elvis_lhs = this.gp2_1.tp1_1;
            var tmp_2 = tmp1_elvis_lhs == null ? this.gp2_1.sp1_1 : tmp1_elvis_lhs;
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda_0(this.ip2_1, this.gp2_1, this.hp2_1, this.kp2_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.sp1_1 = db;
    this.tp1_1 = repo;
    this.up1_1 = enrolIntoCourseUseCase;
  }
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase).lp2 = 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.up2_1 = $effectiveDb;
    this.vp2_1 = $enrolment;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).rom = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.rom(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.up2_1.t7d().insertAsync(this.vp2_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).jo1 = function (it, completion) {
    var i = new EnrolIntoCourseUseCase$invoke$slambda(this.up2_1, this.vp2_1, completion);
    i.wp2_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.rom(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$25(_this__u8e3s4, enrolment, timeZoneId, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fp3_1 = _this__u8e3s4;
    this.gp3_1 = enrolment;
    this.hp3_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.fp3_1.wp1_1;
            suspendResult = (tmp0_elvis_lhs == null ? this.fp3_1.vp1_1 : tmp0_elvis_lhs).t7d().i93(this.gp3_1.d8i_1, this.gp3_1.c8i_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            this.gp3_1.e8i_1 = toLocalMidnight(Companion_getInstance_6().mmi(this.gp3_1.e8i_1), this.hp3_1).lmi();
            if (this.gp3_1.f8i_1.c7(get_UNSET_DISTANT_FUTURE()) < 0) {
              this.gp3_1.f8i_1 = toLocalEndOfDay(Companion_getInstance_6().mmi(this.gp3_1.f8i_1), this.hp3_1).lmi();
            }

            var tmp_0 = this;
            var tmp1_elvis_lhs = this.fp3_1.wp1_1;
            tmp_0.jp3_1 = tmp1_elvis_lhs == null ? this.fp3_1.vp1_1 : tmp1_elvis_lhs;
            this.hd_1 = 2;
            suspendResult = withDoorTransactionAsync(this.jp3_1, VOID, EnrolIntoCourseUseCase$invoke$slambda_0(this.jp3_1, this.gp3_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.vp1_1 = db;
    this.wp1_1 = repo;
  }
  protoOf(EnrolIntoCourseUseCase).xp1 = 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.sp3_1 = _this__u8e3s4;
    this.tp3_1 = clazzCode;
    this.up3_1 = person;
    this.vp3_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.sp3_1.zp3_1.o7d().r8c(this.tp3_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_0.xp3_1 = tmp_1;
            this.hd_1 = 2;
            suspendResult = this.sp3_1.zp3_1.n7f().sex(this.up3_1.f96_1, this.xp3_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.sp3_1.zp3_1.t7d().i93(this.xp3_1.r8d_1, this.up3_1.f96_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

          case 5:
            this.hd_1 = 6;
            var tmp_2 = this.sp3_1.zp3_1.n7f();
            var tmp_3 = this.xp3_1.r8d_1;
            var tmp_4 = this.xp3_1.s8d_1;
            var tmp_5 = this.up3_1.f96_1;
            var tmp_6 = this.up3_1.hks();
            var tmp_7 = this.up3_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.vp3_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.zp3_1 = activeRepo;
  }
  protoOf(RequestEnrolmentUseCase).ap4 = 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_37() {
  }
  var Companion_instance_86;
  function Companion_getInstance_54() {
    return Companion_instance_86;
  }
  function $serializer_34() {
    $serializer_instance_34 = 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.cp4_1 = tmp0_serialDesc;
  }
  protoOf($serializer_34).q44 = function () {
    return this.cp4_1;
  };
  protoOf($serializer_34).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_34).s44 = function (decoder) {
    var tmp0_desc = this.cp4_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_34).dp4 = function (encoder, value) {
    var tmp0_desc = this.cp4_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.ep4_1 === 1280)) {
      tmp1_output.r49(tmp0_desc, 0, value.ep4_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.fp4_1 === 1280)) {
      tmp1_output.r49(tmp0_desc, 1, value.fp4_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !value.gp4_1.equals(CompressionLevel_MEDIUM_getInstance())) {
      tmp1_output.y49(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), value.gp4_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_34).r44 = function (encoder, value) {
    return this.dp4(encoder, value instanceof CompressParams ? value : THROW_CCE());
  };
  var $serializer_instance_34;
  function $serializer_getInstance_46() {
    if ($serializer_instance_34 == null)
      new $serializer_34();
    return $serializer_instance_34;
  }
  function CompressParams_init_$Init$(seen1, maxWidth, maxHeight, compressionLevel, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_46().cp4_1);
    }
    if (0 === (seen1 & 1))
      $this.ep4_1 = 1280;
    else
      $this.ep4_1 = maxWidth;
    if (0 === (seen1 & 2))
      $this.fp4_1 = 1280;
    else
      $this.fp4_1 = maxHeight;
    if (0 === (seen1 & 4))
      $this.gp4_1 = CompressionLevel_MEDIUM_getInstance();
    else
      $this.gp4_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.ep4_1 = maxWidth;
    this.fp4_1 = maxHeight;
    this.gp4_1 = compressionLevel;
  }
  protoOf(CompressParams).toString = function () {
    return 'CompressParams(maxWidth=' + this.ep4_1 + ', maxHeight=' + this.fp4_1 + ', compressionLevel=' + this.gp4_1 + ')';
  };
  protoOf(CompressParams).hashCode = function () {
    var result = this.ep4_1;
    result = imul(result, 31) + this.fp4_1 | 0;
    result = imul(result, 31) + this.gp4_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.ep4_1 === tmp0_other_with_cast.ep4_1))
      return false;
    if (!(this.fp4_1 === tmp0_other_with_cast.fp4_1))
      return false;
    if (!this.gp4_1.equals(tmp0_other_with_cast.gp4_1))
      return false;
    return true;
  };
  function CompressResult(uri, mimeType, originalSize, compressedSize) {
    this.eow_1 = uri;
    this.fow_1 = mimeType;
    this.gow_1 = originalSize;
    this.how_1 = compressedSize;
  }
  protoOf(CompressResult).toString = function () {
    return 'CompressResult(uri=' + this.eow_1 + ', mimeType=' + this.fow_1 + ', originalSize=' + this.gow_1.toString() + ', compressedSize=' + this.how_1.toString() + ')';
  };
  protoOf(CompressResult).hashCode = function () {
    var result = getStringHashCode(this.eow_1);
    result = imul(result, 31) + getStringHashCode(this.fow_1) | 0;
    result = imul(result, 31) + this.gow_1.hashCode() | 0;
    result = imul(result, 31) + this.how_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.eow_1 === tmp0_other_with_cast.eow_1))
      return false;
    if (!(this.fow_1 === tmp0_other_with_cast.fow_1))
      return false;
    if (!this.gow_1.equals(tmp0_other_with_cast.gow_1))
      return false;
    if (!this.how_1.equals(tmp0_other_with_cast.how_1))
      return false;
    return true;
  };
  function CompressUseCase() {
  }
  function _get_$cachedSerializer__te6jhj($this) {
    return $this.ip4_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_38() {
    Companion_instance_87 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.ip4_1 = lazy(tmp_0, CompressionLevel$Companion$_anonymous__cmsj0x);
  }
  protoOf(Companion_38).jp4 = 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.mp4_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_38).n4r = function () {
    return _get_$cachedSerializer__te6jhj(this);
  };
  protoOf(Companion_38).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_87;
  function Companion_getInstance_55() {
    CompressionLevel_initEntries();
    if (Companion_instance_87 == null)
      new Companion_38();
    return Companion_instance_87;
  }
  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_55();
  }
  var $ENTRIES;
  function CompressionLevel(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.mp4_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.np4_1 = PrimitiveSerialDescriptor('CompressionLevel', INT_getInstance());
  }
  protoOf(CompressionLevelSerializer).q44 = function () {
    return this.np4_1;
  };
  protoOf(CompressionLevelSerializer).s44 = function (decoder) {
    return Companion_getInstance_55().jp4(decoder.y47());
  };
  protoOf(CompressionLevelSerializer).op4 = function (encoder, value) {
    encoder.g49(value.mp4_1);
  };
  protoOf(CompressionLevelSerializer).r44 = function (encoder, value) {
    return this.op4(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.hoi_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().zme(element.loi_1);
        destination.s(tmp$ret$0, element);
      }
      tmp = destination;
    } else {
      tmp = entryMap;
    }
    entryMap = tmp;
    this.pp4_1 = manifest;
    this.qp4_1 = entryMap;
  }
  protoOf(ContentManifestMap).rp4 = function (manifestUrl, pathInContentEntryVersion) {
    return UrlKmp(manifestUrl).sp4(pathInContentEntryVersion).toString();
  };
  protoOf(ContentManifestMap).toString = function () {
    return 'ContentManifestMap(manifest=' + this.pp4_1 + ', entryMap=' + this.qp4_1 + ')';
  };
  protoOf(ContentManifestMap).hashCode = function () {
    var result = this.pp4_1.hashCode();
    result = imul(result, 31) + hashCode(this.qp4_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.pp4_1.equals(tmp0_other_with_cast.pp4_1))
      return false;
    if (!equals(this.qp4_1, tmp0_other_with_cast.qp4_1))
      return false;
    return true;
  };
  function DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation) {
    this.bp5_1 = this$0;
    this.cp5_1 = $entries;
    this.dp5_1 = $timeNow;
    this.ep5_1 = $activeUserPersonUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.io1(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.bp5_1.kp5_1.x7d();
            var this_0 = this.cp5_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.mp5_1);
            }

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

            continue $sm;
          case 1:
            var tmp_1 = this;
            tmp_1.gp5_1 = this.cp5_1;
            this.hp5_1 = this.gp5_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.hp5_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.ip5_1 = this.hp5_1.e();
            var tmp_2 = this;
            tmp_2.jp5_1 = this.ip5_1;
            this.hd_1 = 3;
            suspendResult = this.bp5_1.kp5_1.m7f().ceg(this.jp5_1.mp5_1, this.dp5_1, this.ep5_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).jo1 = function (it, completion) {
    var i = new DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this.bp5_1, this.cp5_1, this.dp5_1, this.ep5_1, completion);
    i.fp5_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DeleteContentEntryParentChildJoinUseCase(repoOrDb) {
    this.kp5_1 = repoOrDb;
  }
  protoOf(DeleteContentEntryParentChildJoinUseCase).op5 = function (entries, activeUserPersonUid, $completion) {
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(this.kp5_1, VOID, DeleteContentEntryParentChildJoinUseCase$invoke$slambda_0(this, entries, timeNow, activeUserPersonUid, null), $completion);
  };
  function Companion_39() {
    this.pp5_1 = 'upload-original-filename';
  }
  var Companion_instance_88;
  function Companion_getInstance_56() {
    return Companion_instance_88;
  }
  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.rp5_1 = indeterminate;
    this.sp5_1 = error;
    this.tp5_1 = processedBytes;
    this.up5_1 = totalBytes;
  }
  protoOf(ContentEntryGetMetadataStatus).vp5 = function () {
    var tmp;
    if (!this.up5_1.equals(new Long(0, 0))) {
      // Inline function 'kotlin.Long.times' call
      tmp = this.tp5_1.cb(toLong(100)).bb(this.up5_1).mb();
    } else {
      tmp = 0;
    }
    return tmp;
  };
  protoOf(ContentEntryGetMetadataStatus).wp5 = function (indeterminate, error, processedBytes, totalBytes) {
    return new ContentEntryGetMetadataStatus(indeterminate, error, processedBytes, totalBytes);
  };
  protoOf(ContentEntryGetMetadataStatus).xp5 = function (indeterminate, error, processedBytes, totalBytes, $super) {
    indeterminate = indeterminate === VOID ? this.rp5_1 : indeterminate;
    error = error === VOID ? this.sp5_1 : error;
    processedBytes = processedBytes === VOID ? this.tp5_1 : processedBytes;
    totalBytes = totalBytes === VOID ? this.up5_1 : totalBytes;
    return $super === VOID ? this.wp5(indeterminate, error, processedBytes, totalBytes) : $super.wp5.call(this, indeterminate, error, processedBytes, totalBytes);
  };
  protoOf(ContentEntryGetMetadataStatus).toString = function () {
    return 'ContentEntryGetMetadataStatus(indeterminate=' + this.rp5_1 + ', error=' + this.sp5_1 + ', processedBytes=' + this.tp5_1.toString() + ', totalBytes=' + this.up5_1.toString() + ')';
  };
  protoOf(ContentEntryGetMetadataStatus).hashCode = function () {
    var result = getBooleanHashCode(this.rp5_1);
    result = imul(result, 31) + (this.sp5_1 == null ? 0 : getStringHashCode(this.sp5_1)) | 0;
    result = imul(result, 31) + this.tp5_1.hashCode() | 0;
    result = imul(result, 31) + this.up5_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.rp5_1 === tmp0_other_with_cast.rp5_1))
      return false;
    if (!(this.sp5_1 == tmp0_other_with_cast.sp5_1))
      return false;
    if (!this.tp5_1.equals(tmp0_other_with_cast.tp5_1))
      return false;
    if (!this.up5_1.equals(tmp0_other_with_cast.up5_1))
      return false;
    return true;
  };
  function UnsupportedContentException(message) {
    Exception_init_$Init$(message, this);
    captureStack(this, UnsupportedContentException);
  }
  function Companion_40() {
    this.yp5_1 = 'text/vtt';
    this.zp5_1 = 'filename';
    this.ap6_1 = 'locale';
    this.bp6_1 = 'WEBVTT';
  }
  var Companion_instance_89;
  function Companion_getInstance_57() {
    return Companion_instance_89;
  }
  function GetSubtitleTrackFromUriUseCase() {
  }
  function CancelImportContentEntryUseCase() {
  }
  function $invokeCOROUTINE$27(_this__u8e3s4, cjiUid, activeUserPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.mp6_1 = _this__u8e3s4;
    this.np6_1 = cjiUid;
    this.op6_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.mp6_1.zp6_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.pp6_1 = tmp_2;
            var tmp_3 = this;
            tmp_3.qp6_1 = this.mp6_1.yp6_1;
            var tmp_4 = this;
            tmp_4.rp6_1 = this.mp6_1.xp6_1.xnv_1 + 'api/contententryimportjob/cancel';
            var tmp_5 = this;
            tmp_5.sp6_1 = this.qp6_1;
            var tmp_6 = this;
            tmp_6.tp6_1 = this.sp6_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.rp6_1);
            parameter(this_0, 'jobUid', this.np6_1);
            doorNodeIdHeader(this_0, this.pp6_1);
            parameter(this_0, 'accountPersonUid', this.op6_1);
            header(this_0, 'cache-control', 'no-store');
            tmp_7.up6_1 = this_0;
            this.up6_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.vp6_1 = this.tp6_1;
            var tmp_9 = this;
            tmp_9.wp6_1 = this.up6_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.wp6_1, this.vp6_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.xp6_1 = learningSpace;
    this.yp6_1 = httpClient;
    this.zp6_1 = repo;
  }
  protoOf(CancelRemoteContentEntryImportUseCase).ap7 = 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.jp7_1 = _this__u8e3s4;
    this.kp7_1 = cjiUid;
    this.lp7_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.jp7_1.wp7_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.mp7_1 = tmp_2;
            var tmp_3 = this;
            tmp_3.np7_1 = this.jp7_1.up7_1;
            var tmp_4 = this;
            tmp_4.op7_1 = this.jp7_1.vp7_1.xnv_1 + 'api/contententryimportjob/dismissError';
            var tmp_5 = this;
            tmp_5.pp7_1 = this.np7_1;
            var tmp_6 = this;
            tmp_6.qp7_1 = this.pp7_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.op7_1);
            parameter(this_0, 'jobUid', this.kp7_1);
            doorNodeIdHeader(this_0, this.mp7_1);
            parameter(this_0, 'accountPersonUid', this.lp7_1);
            header(this_0, 'cache-control', 'no-store');
            tmp_7.rp7_1 = this_0;
            this.rp7_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.sp7_1 = this.qp7_1;
            var tmp_9 = this;
            tmp_9.tp7_1 = this.rp7_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.tp7_1, this.sp7_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.up7_1 = httpClient;
    this.vp7_1 = learningSpace;
    this.wp7_1 = repo;
  }
  protoOf(DismissRemoteContentEntryImportErrorUseCase).ap7 = 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.gp8_1 = _this__u8e3s4;
    this.hp8_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.ip8_1 = this.gp8_1.qp8_1;
            var tmp_1 = this;
            tmp_1.jp8_1 = this.gp8_1.pp8_1.xnv_1 + 'api/import/importRequest';
            var tmp_2 = this;
            tmp_2.kp8_1 = this.ip8_1;
            var tmp_3 = this;
            tmp_3.lp8_1 = this.kp8_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.jp8_1);
            contentType(this_0, Application_getInstance().v2r_1);
            setBodyJson(this_0, this.gp8_1.rp8_1, Companion_instance_90.n4r(), new ImportRequest(this.hp8_1));
            tmp_4.mp8_1 = this_0;
            this.mp8_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_5 = this;
            tmp_5.np8_1 = this.lp8_1;
            var tmp_6 = this;
            tmp_6.op8_1 = this.mp8_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.op8_1, this.np8_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.pp8_1 = learningSpace;
    this.qp8_1 = httpClient;
    this.rp8_1 = json;
  }
  protoOf(EnqueueImportContentEntryUseCaseRemote).xp7 = 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_41() {
  }
  protoOf(Companion_41).n4r = function () {
    return $serializer_getInstance_47();
  };
  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.contententry.importcontent.ImportRequest', this, 1);
    tmp0_serialDesc.t4f('contentJobItem', false);
    this.sp8_1 = tmp0_serialDesc;
  }
  protoOf($serializer_35).q44 = function () {
    return this.sp8_1;
  };
  protoOf($serializer_35).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_35).s44 = function (decoder) {
    var tmp0_desc = this.sp8_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_35).tp8 = function (encoder, value) {
    var tmp0_desc = this.sp8_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_5(), value.up8_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_35).r44 = function (encoder, value) {
    return this.tp8(encoder, value instanceof ImportRequest ? value : THROW_CCE());
  };
  var $serializer_instance_35;
  function $serializer_getInstance_47() {
    if ($serializer_instance_35 == null)
      new $serializer_35();
    return $serializer_instance_35;
  }
  function ImportRequest_init_$Init$(seen1, contentJobItem, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_47().sp8_1);
    }
    $this.up8_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.up8_1 = contentJobItem;
  }
  protoOf(ImportRequest).toString = function () {
    return 'ImportRequest(contentJobItem=' + this.up8_1 + ')';
  };
  protoOf(ImportRequest).hashCode = function () {
    return this.up8_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.up8_1.equals(tmp0_other_with_cast.up8_1))
      return false;
    return true;
  };
  function DefaultLaunchContentEntryVersionUseCase() {
  }
  protoOf(DefaultLaunchContentEntryVersionUseCase).vp8 = 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_126();
      var tmp_0 = to('entityUid', contentEntryVersion.lax_1.toString());
      Companion_getInstance_126();
      var tmp_1 = to('courseBlockUid', cbUid.toString());
      Companion_getInstance_126();
      var tmp_2 = to('clazzUid', clazzUid.toString());
      Companion_getInstance_126();
      navController.wp8(destName, mapOf([tmp_0, tmp_1, tmp_2, to('entryid', contentEntryVersion.max_1.toString())]));
    }
    return new LaunchResult();
  };
  protoOf(DefaultLaunchContentEntryVersionUseCase).xp8 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    return this.vp8(contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
  };
  function LaunchResult(message) {
    message = message === VOID ? null : message;
    this.yp8_1 = message;
  }
  protoOf(LaunchResult).toString = function () {
    return 'LaunchResult(message=' + this.yp8_1 + ')';
  };
  protoOf(LaunchResult).hashCode = function () {
    return this.yp8_1 == null ? 0 : getStringHashCode(this.yp8_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.yp8_1 == tmp0_other_with_cast.yp8_1))
      return false;
    return true;
  };
  function LaunchContentEntryVersionUseCase() {
  }
  function LaunchEpubUseCase() {
  }
  function LaunchXapiUseCase() {
  }
  function XapiLaunchHrefResult(url, launchUriInContent, launchActivity, manifestUrl) {
    this.zp8_1 = url;
    this.ap9_1 = launchUriInContent;
    this.bp9_1 = launchActivity;
    this.cp9_1 = manifestUrl;
  }
  function ResolveXapiLaunchHrefUseCase$invoke$lambda($contentEntryVersionUid) {
    return function () {
      return 'Resolving xAPI url for contentEntryVersion ' + $contentEntryVersionUid.toString();
    };
  }
  function ResolveXapiLaunchHrefUseCase$invoke$slambda($contentEntryVersionUid, resultContinuation) {
    this.lp9_1 = $contentEntryVersionUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).np9 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.np9(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.mp9_1.i7f().fbq(this.lp9_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).jo1 = function (it, completion) {
    var i = new ResolveXapiLaunchHrefUseCase$invoke$slambda(this.lp9_1, completion);
    i.mp9_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.np9(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.wp9_1 = _this__u8e3s4;
    this.xp9_1 = contentEntryVersionUid;
    this.yp9_1 = clazzUid;
    this.zp9_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.xp9_1));
            this.hd_1 = 1;
            suspendResult = localFirstThenRepoIfNull(this.wp9_1.dpb_1, ResolveXapiLaunchHrefUseCase$invoke$slambda_0(this.xp9_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

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

            tmp_3.cpa_1 = tmp_4;
            var tmp_5 = this;
            tmp_5.dpa_1 = this.wp9_1.fpb_1;
            var tmp_6 = this;
            tmp_6.epa_1 = this.wp9_1.epb_1;
            var tmp_7 = this;
            tmp_7.fpa_1 = this.cpa_1;
            var tmp_8 = this;
            tmp_8.gpa_1 = this.epa_1;
            var tmp_9 = this;
            tmp_9.hpa_1 = this.gpa_1;
            var tmp_10 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.fpa_1);
            tmp_10.ipa_1 = this_0;
            this.ipa_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_11 = this;
            tmp_11.jpa_1 = this.hpa_1;
            var tmp_12 = this;
            tmp_12.kpa_1 = this.ipa_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.kpa_1, this.jpa_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 3:
            this.mpa_1 = suspendResult;
            var tmp_13 = this;
            var this_1 = this.dpa_1.t45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_13.npa_1 = this.dpa_1.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.mpa_1);
            this.opa_1 = requireEntryByUri(this.npa_1, ensureNotNull(this.bpa_1.nax_1));
            var tmp_14 = this;
            tmp_14.ppa_1 = this.wp9_1.epb_1;
            var tmp_15 = this;
            tmp_15.qpa_1 = this.opa_1.toi_1;
            var tmp_16 = this;
            tmp_16.rpa_1 = this.ppa_1;
            var tmp_17 = this;
            tmp_17.spa_1 = this.rpa_1;
            var tmp_18 = this;
            var this_3 = new HttpRequestBuilder();
            url(this_3, this.qpa_1);
            tmp_18.tpa_1 = this_3;
            this.tpa_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_19 = this;
            tmp_19.upa_1 = this.spa_1;
            var tmp_20 = this;
            tmp_20.vpa_1 = this.tpa_1;
            this.hd_1 = 4;
            suspendResult = (new HttpStatement(this.vpa_1, this.upa_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 5:
            this.xpa_1 = suspendResult;
            this.ypa_1 = this.wp9_1.gpb_1.y7c();
            setInputString(this.ypa_1, this.xpa_1);
            this.zpa_1 = Companion_instance_136.mpb(this.ypa_1);
            var tmp_21 = this;
            var tmp2_safe_receiver = this.zpa_1.npb_1;
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.vpb_1;
            var tmp_22;
            if (tmp3_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('ContentEntryVersion ' + this.xp9_1.toString() + ' manifesturl is null');
            } else {
              tmp_22 = tmp3_elvis_lhs;
            }

            tmp_21.apb_1 = tmp_22;
            var tmp_23 = this;
            var tmp4_safe_receiver = this.zpa_1.npb_1;
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.spb_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.bpb_1 = tmp_24;
            this.cpb_1 = this.wp9_1.jpb_1.eoc().znw_1.f96_1;
            this.hd_1 = 6;
            suspendResult = this.wp9_1.hpb_1.ypb(this.cpb_1, this.wp9_1.jpb_1.eoc().enx(), this.bpb_1, this.yp9_1, this.zp9_1, this.bpa_1.max_1, this.xp9_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            var xapiSession = suspendResult;
            var queryParams = mapOf([to('endpoint', this.wp9_1.ipb_1.zpb('/api/xapi/')), to('auth', authorizationHeader(xapiSession)), to('actor', this.wp9_1.fpb_1.r45(Companion_instance_114.n4r(), agent(xapiSession, this.wp9_1.kpb_1))), to('registration', get_registrationUuid(xapiSession).toString()), to('activity_id', xapiSession.zk0_1)]);
            var url_0 = appendQueryArgs(UMFileUtil_getInstance().fpc(this.cpa_1, this.apb_1), queryParams);
            var tinCanXmlPathPrefix = substringBeforeLast(ensureNotNull(this.bpa_1.nax_1), '/', '');
            var tmp_25 = Napier_getInstance();
            tmp_25.e5e(VOID, VOID, ResolveXapiLaunchHrefUseCase$invoke$lambda_0(this.xp9_1, url_0));
            return new XapiLaunchHrefResult(url_0, appendQueryArgs(tinCanXmlPathPrefix + this.apb_1, queryParams), ensureNotNull(this.zpa_1.npb_1), this.cpa_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.dpb_1 = activeRepoOrDb;
    this.epb_1 = httpClient;
    this.fpb_1 = json;
    this.gpb_1 = xppFactory;
    this.hpb_1 = resumeOrStartXapiSessionUseCase;
    this.ipb_1 = getApiUrlUseCase;
    this.jpb_1 = accountManager;
    this.kpb_1 = learningSpace;
  }
  protoOf(ResolveXapiLaunchHrefUseCase).gpc = 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.hpc_1 = repo;
    this.ipc_1 = systemImpl;
  }
  protoOf(MoveContentEntriesUseCase).jpc = 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.lp5_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.ipc_1.vol(strings_getInstance().ino_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.np5_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.ipc_1.vol(strings_getInstance().jno_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.mp5_1;
      destination.i1(tmp$ret$4);
    }
    var uidsToMove = destination;
    if (uidsToMove.c1())
      return Unit_instance;
    return this.hpc_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.spc_1 = $effectiveDb;
    this.tpc_1 = $contentEntry;
    this.upc_1 = $picture;
    this.vpc_1 = $initPictureUri;
    this.wpc_1 = this$0;
    this.xpc_1 = $joinToParentUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveContentEntryUseCase$invoke$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.io1(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.spc_1.v7d().qau(this.tpc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.upc_1 == null) ? !(this.upc_1.fax_1 == this.vpc_1) : false) {
              var tmp_0 = Napier_getInstance();
              tmp_0.e5e(VOID, VOID, SaveContentEntryUseCase$invoke$slambda$lambda(this.upc_1));
              this.hd_1 = 2;
              suspendResult = this.wpc_1.zpc_1.r7f().tbi(listOf_0(this.upc_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.xpc_1 == null)) {
              this.hd_1 = 4;
              suspendResult = this.spc_1.x7d().insertAsync(new ContentEntryParentChildJoin(this.xpc_1, this.tpc_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).jo1 = function (it, completion) {
    var i = new SaveContentEntryUseCase$invoke$slambda(this.spc_1, this.tpc_1, this.upc_1, this.vpc_1, this.wpc_1, this.xpc_1, completion);
    i.ypc_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$31(_this__u8e3s4, contentEntry, joinToParentUid, picture, initPictureUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.kpd_1 = _this__u8e3s4;
    this.lpd_1 = contentEntry;
    this.mpd_1 = joinToParentUid;
    this.npd_1 = picture;
    this.opd_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.kpd_1.apd_1;
            tmp_0.ppd_1 = tmp0_elvis_lhs == null ? this.kpd_1.zpc_1 : tmp0_elvis_lhs;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.ppd_1, VOID, SaveContentEntryUseCase$invoke$slambda_0(this.ppd_1, this.lpd_1, this.npd_1, this.opd_1, this.kpd_1, this.mpd_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.npd_1 == null) ? !(this.npd_1.fax_1 == this.opd_1) : false) {
              this.hd_1 = 2;
              var tmp_1 = this.npd_1.dax_1;
              suspendResult = this.kpd_1.bpd_1.gou(tmp_1, 6678, this.npd_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.zpc_1 = db;
    this.apd_1 = repo;
    this.bpd_1 = enqueueSavePictureUseCase;
  }
  protoOf(SaveContentEntryUseCase).qpd = 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).rpd = 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.sk9_1.t7x_1.equals(addOrUpdateBlock.sk9_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.eka(addOrUpdateBlock.sk9_1.mkn(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.sk9_1.w7x_1.equals(parentModUid) ? true : !(item.sk9_1.g7y_1 === index_0)) {
        tmp = item.eka(item.sk9_1.mkn(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).sk9_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.sk9_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).eka(this_0.v(index).sk9_1.mkn(VOID, VOID, autoIndent)));
      tmp_3 = toList(this_0);
    } else {
      tmp_3 = _this__u8e3s4;
    }
    return tmp_3;
  }
  function findParentModule(_this__u8e3s4, forBlock) {
    var tmp = forBlock.sk9_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.sk9_1.t7x_1.equals(forBlock.sk9_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.sk9_1.u7x_1;
    if (tmp_2 === 100) {
      tmp_1 = prevBlock.sk9_1.t7x_1;
    } else {
      if (prevBlock.sk9_1.v7x_1 >= 1) {
        tmp_1 = prevBlock.sk9_1.w7x_1;
      } else {
        tmp_1 = new Long(0, 0);
      }
    }
    return tmp_1;
  }
  function UpdateCourseBlocksOnReorderOrCommitUseCase() {
  }
  protoOf(UpdateCourseBlocksOnReorderOrCommitUseCase).spd = function (currentList, autoIndentIndex) {
    var tmp;
    if (autoIndentIndex >= 0) {
      tmp = autoIndent(currentList, autoIndentIndex);
    } else {
      tmp = currentList;
    }
    var listIndented = tmp;
    return updateParentModuleUidsAndIndex(listIndented);
  };
  protoOf(UpdateCourseBlocksOnReorderOrCommitUseCase).tpd = function (currentList, autoIndentIndex, $super) {
    autoIndentIndex = autoIndentIndex === VOID ? -1 : autoIndentIndex;
    return $super === VOID ? this.spd(currentList, autoIndentIndex) : $super.spd.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_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.PasskeyVerifyResult', this, 4);
    tmp0_serialDesc.t4f('isVerified', false);
    tmp0_serialDesc.t4f('personUid', false);
    tmp0_serialDesc.t4f('firstName', true);
    tmp0_serialDesc.t4f('lastName', true);
    this.wpd_1 = tmp0_serialDesc;
  }
  protoOf($serializer_36).q44 = function () {
    return this.wpd_1;
  };
  protoOf($serializer_36).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_36).s44 = function (decoder) {
    var tmp0_desc = this.wpd_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_36).xpd = function (encoder, value) {
    var tmp0_desc = this.wpd_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.o49(tmp0_desc, 0, value.lo8_1);
    tmp1_output.s49(tmp0_desc, 1, value.mo8_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.no8_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.no8_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.oo8_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.oo8_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_36).r44 = function (encoder, value) {
    return this.xpd(encoder, value instanceof PasskeyVerifyResult ? value : THROW_CCE());
  };
  var $serializer_instance_36;
  function $serializer_getInstance_48() {
    if ($serializer_instance_36 == null)
      new $serializer_36();
    return $serializer_instance_36;
  }
  function PasskeyVerifyResult_init_$Init$(seen1, isVerified, personUid, firstName, lastName, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_48().wpd_1);
    }
    $this.lo8_1 = isVerified;
    $this.mo8_1 = personUid;
    if (0 === (seen1 & 4))
      $this.no8_1 = null;
    else
      $this.no8_1 = firstName;
    if (0 === (seen1 & 8))
      $this.oo8_1 = null;
    else
      $this.oo8_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.lo8_1 = isVerified;
    this.mo8_1 = personUid;
    this.no8_1 = firstName;
    this.oo8_1 = lastName;
  }
  protoOf(PasskeyVerifyResult).toString = function () {
    return 'PasskeyVerifyResult(isVerified=' + this.lo8_1 + ', personUid=' + this.mo8_1.toString() + ', firstName=' + this.no8_1 + ', lastName=' + this.oo8_1 + ')';
  };
  protoOf(PasskeyVerifyResult).hashCode = function () {
    var result = getBooleanHashCode(this.lo8_1);
    result = imul(result, 31) + this.mo8_1.hashCode() | 0;
    result = imul(result, 31) + (this.no8_1 == null ? 0 : getStringHashCode(this.no8_1)) | 0;
    result = imul(result, 31) + (this.oo8_1 == null ? 0 : getStringHashCode(this.oo8_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.lo8_1 === tmp0_other_with_cast.lo8_1))
      return false;
    if (!this.mo8_1.equals(tmp0_other_with_cast.mo8_1))
      return false;
    if (!(this.no8_1 == tmp0_other_with_cast.no8_1))
      return false;
    if (!(this.oo8_1 == tmp0_other_with_cast.oo8_1))
      return false;
    return true;
  };
  function SavePersonPasskeyUseCase(db, repo, json) {
    this.do5_1 = db;
    this.eo5_1 = repo;
    this.fo5_1 = json;
  }
  protoOf(SavePersonPasskeyUseCase).go5 = function (passkeyResult, person, $completion) {
    var tmp0_elvis_lhs = this.eo5_1;
    var effectiveDb = tmp0_elvis_lhs == null ? this.do5_1 : tmp0_elvis_lhs;
    var clientDataJSONBase64 = passkeyResult.gpe_1.ape_1;
    var decodedBytes = decodeBase64Bytes(clientDataJSONBase64);
    // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
    var this_0 = this.fo5_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.gpe_1.ypd_1, passkeyResult.gpe_1.ape_1, clientDataJson.mpe_1, passkeyResult.epe_1, clientDataJson.lpe_1, passkeyResult.gpe_1.bpe_1);
    return effectiveDb.b7g().yh0(personPasskey, $completion);
  };
  function DecodeUserHandleUseCase() {
  }
  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.AuthenticationExtensionsClientOutputsJSON', this, 1);
    tmp0_serialDesc.t4f('prf', true);
    this.ope_1 = tmp0_serialDesc;
  }
  protoOf($serializer_37).q44 = function () {
    return this.ope_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($serializer_getInstance_50())];
  };
  protoOf($serializer_37).s44 = function (decoder) {
    var tmp0_desc = this.ope_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_50(), 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_50(), 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_37).ppe = function (encoder, value) {
    var tmp0_desc = this.ope_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.qpe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, $serializer_getInstance_50(), value.qpe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_37).r44 = function (encoder, value) {
    return this.ppe(encoder, value instanceof AuthenticationExtensionsClientOutputsJSON ? value : THROW_CCE());
  };
  var $serializer_instance_37;
  function $serializer_getInstance_49() {
    if ($serializer_instance_37 == null)
      new $serializer_37();
    return $serializer_instance_37;
  }
  function AuthenticationExtensionsClientOutputsJSON_init_$Init$(seen1, prf, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_49().ope_1);
    }
    if (0 === (seen1 & 1))
      $this.qpe_1 = null;
    else
      $this.qpe_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.qpe_1 = prf;
  }
  protoOf(AuthenticationExtensionsClientOutputsJSON).toString = function () {
    return 'AuthenticationExtensionsClientOutputsJSON(prf=' + this.qpe_1 + ')';
  };
  protoOf(AuthenticationExtensionsClientOutputsJSON).hashCode = function () {
    return this.qpe_1 == null ? 0 : this.qpe_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.qpe_1, tmp0_other_with_cast.qpe_1))
      return false;
    return true;
  };
  function Companion_44() {
  }
  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.AuthenticationExtensionsPRFOutputsJSON', this, 1);
    tmp0_serialDesc.t4f('enabled', true);
    this.rpe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_38).q44 = function () {
    return this.rpe_1;
  };
  protoOf($serializer_38).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_38).s44 = function (decoder) {
    var tmp0_desc = this.rpe_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_38).spe = function (encoder, value) {
    var tmp0_desc = this.rpe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.tpe_1 === false)) {
      tmp1_output.a4a(tmp0_desc, 0, BooleanSerializer_getInstance(), value.tpe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_38).r44 = function (encoder, value) {
    return this.spe(encoder, value instanceof AuthenticationExtensionsPRFOutputsJSON ? value : THROW_CCE());
  };
  var $serializer_instance_38;
  function $serializer_getInstance_50() {
    if ($serializer_instance_38 == null)
      new $serializer_38();
    return $serializer_instance_38;
  }
  function AuthenticationExtensionsPRFOutputsJSON_init_$Init$(seen1, enabled, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_50().rpe_1);
    }
    if (0 === (seen1 & 1))
      $this.tpe_1 = false;
    else
      $this.tpe_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.tpe_1 = enabled;
  }
  protoOf(AuthenticationExtensionsPRFOutputsJSON).toString = function () {
    return 'AuthenticationExtensionsPRFOutputsJSON(enabled=' + this.tpe_1 + ')';
  };
  protoOf(AuthenticationExtensionsPRFOutputsJSON).hashCode = function () {
    return this.tpe_1 == null ? 0 : getBooleanHashCode(this.tpe_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.tpe_1 == tmp0_other_with_cast.tpe_1))
      return false;
    return true;
  };
  function Companion_45() {
  }
  protoOf(Companion_45).n4r = function () {
    return $serializer_getInstance_51();
  };
  var Companion_instance_94;
  function Companion_getInstance_62() {
    return Companion_instance_94;
  }
  function $serializer_39() {
    $serializer_instance_39 = 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.upe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_39).q44 = function () {
    return this.upe_1;
  };
  protoOf($serializer_39).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_52(), get_nullable(StringSerializer_getInstance()), $serializer_getInstance_49(), StringSerializer_getInstance()];
  };
  protoOf($serializer_39).s44 = function (decoder) {
    var tmp0_desc = this.upe_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_52(), 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_49(), 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_52(), 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_49(), 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_39).vpe = function (encoder, value) {
    var tmp0_desc = this.upe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.epe_1);
    tmp1_output.w49(tmp0_desc, 1, value.fpe_1);
    tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_52(), value.gpe_1);
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.hpe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.hpe_1);
    }
    tmp1_output.y49(tmp0_desc, 4, $serializer_getInstance_49(), value.ipe_1);
    tmp1_output.w49(tmp0_desc, 5, value.jpe_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_39).r44 = function (encoder, value) {
    return this.vpe(encoder, value instanceof AuthenticationResponseJSON ? value : THROW_CCE());
  };
  var $serializer_instance_39;
  function $serializer_getInstance_51() {
    if ($serializer_instance_39 == null)
      new $serializer_39();
    return $serializer_instance_39;
  }
  function AuthenticationResponseJSON_init_$Init$(seen1, id, rawId, response, authenticatorAttachment, clientExtensionResults, type, serializationConstructorMarker, $this) {
    if (!(55 === (55 & seen1))) {
      throwMissingFieldException(seen1, 55, $serializer_getInstance_51().upe_1);
    }
    $this.epe_1 = id;
    $this.fpe_1 = rawId;
    $this.gpe_1 = response;
    if (0 === (seen1 & 8))
      $this.hpe_1 = null;
    else
      $this.hpe_1 = authenticatorAttachment;
    $this.ipe_1 = clientExtensionResults;
    $this.jpe_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.epe_1 + ', rawId=' + this.fpe_1 + ', response=' + this.gpe_1 + ', authenticatorAttachment=' + this.hpe_1 + ', clientExtensionResults=' + this.ipe_1 + ', type=' + this.jpe_1 + ')';
  };
  protoOf(AuthenticationResponseJSON).hashCode = function () {
    var result = getStringHashCode(this.epe_1);
    result = imul(result, 31) + getStringHashCode(this.fpe_1) | 0;
    result = imul(result, 31) + this.gpe_1.hashCode() | 0;
    result = imul(result, 31) + (this.hpe_1 == null ? 0 : getStringHashCode(this.hpe_1)) | 0;
    result = imul(result, 31) + this.ipe_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.jpe_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.epe_1 === tmp0_other_with_cast.epe_1))
      return false;
    if (!(this.fpe_1 === tmp0_other_with_cast.fpe_1))
      return false;
    if (!this.gpe_1.equals(tmp0_other_with_cast.gpe_1))
      return false;
    if (!(this.hpe_1 == tmp0_other_with_cast.hpe_1))
      return false;
    if (!this.ipe_1.equals(tmp0_other_with_cast.ipe_1))
      return false;
    if (!(this.jpe_1 === tmp0_other_with_cast.jpe_1))
      return false;
    return true;
  };
  function $serializer_40() {
    $serializer_instance_40 = 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.wpe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_40).q44 = function () {
    return this.wpe_1;
  };
  protoOf($serializer_40).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_40).s44 = function (decoder) {
    var tmp0_desc = this.wpe_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_40).xpe = function (encoder, value) {
    var tmp0_desc = this.wpe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.ypd_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.ypd_1);
    }
    tmp1_output.w49(tmp0_desc, 1, value.zpd_1);
    tmp1_output.w49(tmp0_desc, 2, value.ape_1);
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.bpe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.bpe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.cpe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.cpe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.dpe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, StringSerializer_getInstance(), value.dpe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_40).r44 = function (encoder, value) {
    return this.xpe(encoder, value instanceof AuthenticatorAssertionResponseJSON ? value : THROW_CCE());
  };
  var $serializer_instance_40;
  function $serializer_getInstance_52() {
    if ($serializer_instance_40 == null)
      new $serializer_40();
    return $serializer_instance_40;
  }
  function AuthenticatorAssertionResponseJSON_init_$Init$(seen1, attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature, serializationConstructorMarker, $this) {
    if (!(6 === (6 & seen1))) {
      throwMissingFieldException(seen1, 6, $serializer_getInstance_52().wpe_1);
    }
    if (0 === (seen1 & 1))
      $this.ypd_1 = null;
    else
      $this.ypd_1 = attestationObject;
    $this.zpd_1 = authenticatorData;
    $this.ape_1 = clientDataJSON;
    if (0 === (seen1 & 8))
      $this.bpe_1 = null;
    else
      $this.bpe_1 = publicKey;
    if (0 === (seen1 & 16))
      $this.cpe_1 = null;
    else
      $this.cpe_1 = userHandle;
    if (0 === (seen1 & 32))
      $this.dpe_1 = null;
    else
      $this.dpe_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.ypd_1 + ', authenticatorData=' + this.zpd_1 + ', clientDataJSON=' + this.ape_1 + ', publicKey=' + this.bpe_1 + ', userHandle=' + this.cpe_1 + ', signature=' + this.dpe_1 + ')';
  };
  protoOf(AuthenticatorAssertionResponseJSON).hashCode = function () {
    var result = this.ypd_1 == null ? 0 : getStringHashCode(this.ypd_1);
    result = imul(result, 31) + getStringHashCode(this.zpd_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.ape_1) | 0;
    result = imul(result, 31) + (this.bpe_1 == null ? 0 : getStringHashCode(this.bpe_1)) | 0;
    result = imul(result, 31) + (this.cpe_1 == null ? 0 : getStringHashCode(this.cpe_1)) | 0;
    result = imul(result, 31) + (this.dpe_1 == null ? 0 : getStringHashCode(this.dpe_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.ypd_1 == tmp0_other_with_cast.ypd_1))
      return false;
    if (!(this.zpd_1 === tmp0_other_with_cast.zpd_1))
      return false;
    if (!(this.ape_1 === tmp0_other_with_cast.ape_1))
      return false;
    if (!(this.bpe_1 == tmp0_other_with_cast.bpe_1))
      return false;
    if (!(this.cpe_1 == tmp0_other_with_cast.cpe_1))
      return false;
    if (!(this.dpe_1 == tmp0_other_with_cast.dpe_1))
      return false;
    return true;
  };
  function Companion_46() {
  }
  var Companion_instance_95;
  function Companion_getInstance_63() {
    return Companion_instance_95;
  }
  function $serializer_41() {
    $serializer_instance_41 = 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.ype_1 = tmp0_serialDesc;
  }
  protoOf($serializer_41).q44 = function () {
    return this.ype_1;
  };
  protoOf($serializer_41).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_41).s44 = function (decoder) {
    var tmp0_desc = this.ype_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_41).zpe = function (encoder, value) {
    var tmp0_desc = this.ype_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.kpe_1);
    tmp1_output.w49(tmp0_desc, 1, value.lpe_1);
    tmp1_output.w49(tmp0_desc, 2, value.mpe_1);
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.npe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, BooleanSerializer_getInstance(), value.npe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_41).r44 = function (encoder, value) {
    return this.zpe(encoder, value instanceof ClientDataJSON ? value : THROW_CCE());
  };
  var $serializer_instance_41;
  function $serializer_getInstance_53() {
    if ($serializer_instance_41 == null)
      new $serializer_41();
    return $serializer_instance_41;
  }
  function ClientDataJSON_init_$Init$(seen1, type, challenge, origin, crossOrigin, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_53().ype_1);
    }
    $this.kpe_1 = type;
    $this.lpe_1 = challenge;
    $this.mpe_1 = origin;
    if (0 === (seen1 & 8))
      $this.npe_1 = null;
    else
      $this.npe_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.kpe_1 = type;
    this.lpe_1 = challenge;
    this.mpe_1 = origin;
    this.npe_1 = crossOrigin;
  }
  protoOf(ClientDataJSON).toString = function () {
    return 'ClientDataJSON(type=' + this.kpe_1 + ', challenge=' + this.lpe_1 + ', origin=' + this.mpe_1 + ', crossOrigin=' + this.npe_1 + ')';
  };
  protoOf(ClientDataJSON).hashCode = function () {
    var result = getStringHashCode(this.kpe_1);
    result = imul(result, 31) + getStringHashCode(this.lpe_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.mpe_1) | 0;
    result = imul(result, 31) + (this.npe_1 == null ? 0 : getBooleanHashCode(this.npe_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.kpe_1 === tmp0_other_with_cast.kpe_1))
      return false;
    if (!(this.lpe_1 === tmp0_other_with_cast.lpe_1))
      return false;
    if (!(this.mpe_1 === tmp0_other_with_cast.mpe_1))
      return false;
    if (!(this.npe_1 == tmp0_other_with_cast.npe_1))
      return false;
    return true;
  };
  function SavePasswordUseCase() {
  }
  function CreateCredentialUsernameUseCase(learningSpace) {
    this.bpf_1 = learningSpace;
  }
  function ParseCredentialUsernameUseCase() {
  }
  protoOf(ParseCredentialUsernameUseCase).zpb = 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.cpf_1 = repoOrDb;
  }
  protoOf(DeletePermanentlyUseCase).dpf = function (items, $completion) {
    var timeNow = systemTimeInMillis();
    var tmp = this.cpf_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.mpf_1 = $itemsByType;
    this.npf_1 = this$0;
    this.opf_1 = $timeNow;
    this.ppf_1 = $items;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.io1(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.rpf_1 = this.mpf_1;
            var tmp_1 = this;
            tmp_1.spf_1 = this.rpf_1.q2().w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.spf_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.tpf_1 = this.spf_1.e();
            var tmp_2 = this;
            tmp_2.upf_1 = this.tpf_1;
            this.vpf_1 = this.upf_1.s2();
            if (this.vpf_1 === 7) {
              this.hd_1 = 2;
              var tmp_3 = this.npf_1.wpf_1.x7d();
              var this_0 = this.upf_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.opf_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.npf_1.wpf_1.m7f();
            var this_1 = this.ppf_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.opf_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).jo1 = function (it, completion) {
    var i = new RestoreDeletedItemUseCase$invoke$slambda(this.mpf_1, this.npf_1, this.opf_1, this.ppf_1, completion);
    i.qpf_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function RestoreDeletedItemUseCase(repoOrDb) {
    this.wpf_1 = repoOrDb;
  }
  protoOf(RestoreDeletedItemUseCase).dpf = 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.wpf_1, VOID, RestoreDeletedItemUseCase$invoke$slambda_0(itemsByType, this, timeNow, items, null), $completion);
  };
  function toEpubTocItem(_this__u8e3s4, $this, indentLevel, parentUids) {
    var uid = $this.ypf_1.atomicfu$incrementAndGet();
    var uidsForChildren = plus_2(parentUids, uid);
    var tmp8_uid = $this.ypf_1.atomicfu$incrementAndGet();
    var tmp0_safe_receiver = _this__u8e3s4.qod_1;
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.god_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.rod_1;
      tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.goe_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.qod_1;
    var tmp10_href = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.hod_1;
    var tmp5_safe_receiver = _this__u8e3s4.sod_1;
    var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.foe_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.ypf_1.atomicfu$incrementAndGet();
    var uidsForChildren = plus_2(parentUids, uid);
    var tmp0_safe_receiver = firstOrNull(_this__u8e3s4.fof_1);
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xoe_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.sof_1;
    var tmp3_label = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
    var tmp4_href = _this__u8e3s4.gof_1.moe_1;
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.iof_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.hpg_1 = _this__u8e3s4;
    this.ipg_1 = opfPackage;
    this.jpg_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.kpg_1 = this.ipg_1.woh();
            if (!(this.kpg_1 == null) ? startsWith(this.kpg_1.rog_1, 'application/xhtml') : false) {
              this.hd_1 = 2;
              suspendResult = this.jpg_1(this.kpg_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_0;
              if (!(this.kpg_1 == null)) {
                tmp_0 = this.kpg_1.rog_1 === 'application/x-dtbncx+xml';
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                this.hd_1 = 1;
                suspendResult = this.jpg_1(this.kpg_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_1 = this;
                tmp_1.lpg_1 = null;
                this.hd_1 = 3;
                continue $sm;
              }
            }

          case 1:
            var docStr = suspendResult;
            var this_0 = this.hpg_1.xpf_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.pof_1.bof_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.hpg_1, 0, emptySet());
              var list = plus(listOf_0(it), it.ppg_1);
              addAll(destination, list);
            }

            tmp_2.lpg_1 = destination;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            var docStr_0 = suspendResult;
            var this_4 = this.hpg_1.xpf_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.boe_1.kod_1).wod_1.foe_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.hpg_1, 0, emptySet());
              var list_0 = plus(listOf_0(it_0), it_0.ppg_1);
              addAll(destination_0, list_0);
            }

            tmp_3.lpg_1 = destination_0;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.lpg_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.xpf_1 = xml;
    this.ypf_1 = atomic$int$1(0);
  }
  protoOf(GetEpubTableOfContentsUseCase).tpg = 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_47() {
    Companion_instance_96 = this;
    this.upg_1 = Companion_getInstance_74().xpg_1;
  }
  var Companion_instance_96;
  function Companion_getInstance_64() {
    if (Companion_instance_96 == null)
      new Companion_47();
    return Companion_instance_96;
  }
  function FilterUsernameUseCase() {
    Companion_getInstance_64();
  }
  protoOf(FilterUsernameUseCase).ypg = 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_64().upg_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.zpg_1 = learningSpace;
  }
  protoOf(GetApiUrlUseCaseDirect).zpb = function (path) {
    return requirePostfix(this.zpg_1.xnv_1, '/') + removePrefix(path, '/');
  };
  function VersionInfo(versionString, buildTime) {
    this.aph_1 = versionString;
    this.bph_1 = buildTime;
  }
  protoOf(VersionInfo).toString = function () {
    return 'VersionInfo(versionString=' + this.aph_1 + ', buildTime=' + this.bph_1.toString() + ')';
  };
  protoOf(VersionInfo).hashCode = function () {
    var result = getStringHashCode(this.aph_1);
    result = imul(result, 31) + this.bph_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.aph_1 === tmp0_other_with_cast.aph_1))
      return false;
    if (!this.bph_1.equals(tmp0_other_with_cast.bph_1))
      return false;
    return true;
  };
  function GetVersionUseCase() {
  }
  function HideKeyboardUseCase() {
  }
  function GetHtmlContentDisplayEngineOptionsUseCase(optionsList) {
    this.eph_1 = optionsList;
  }
  protoOf(GetHtmlContentDisplayEngineOptionsUseCase).cph = function () {
    return this.eph_1;
  };
  function GetHtmlContentDisplayEngineUseCase(settings, getOptionsUseCase) {
    this.fph_1 = settings;
    this.gph_1 = getOptionsUseCase;
  }
  protoOf(GetHtmlContentDisplayEngineUseCase).cph = function () {
    // Inline function 'com.russhwolf.settings.get' call
    var this_0 = this.fph_1;
    var key = 'com.ustadmobile.htmlcontentdisplayengine';
    var settingInt = this_0.dm9(key, 0);
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.gph_1.cph().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.htmlcontentdisplayengine.GetHtmlContentDisplayEngineUseCase.invoke.<anonymous>' call
        if (element.hph_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.gph_1.cph()) : tmp0_elvis_lhs;
  };
  function Companion_48() {
    this.kph_1 = 'com.ustadmobile.htmlcontentdisplayengine';
  }
  var Companion_instance_97;
  function Companion_getInstance_65() {
    return Companion_instance_97;
  }
  function SetHtmlContentDisplayEngineUseCase(settings) {
    this.lph_1 = settings;
  }
  function ClazzInviteRedeemException(message, stringResource) {
    Exception_init_$Init$(message, this);
    captureStack(this, ClazzInviteRedeemException);
    this.mph_1 = stringResource;
  }
  protoOf(ClazzInviteRedeemException).nph = function () {
    return this.mph_1;
  };
  function ClazzInviteRedeemUseCase$invoke$slambda($effectiveDb, $clazzInvite, $enrolmentUid, resultContinuation) {
    this.wph_1 = $effectiveDb;
    this.xph_1 = $clazzInvite;
    this.yph_1 = $enrolmentUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.io1(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.wph_1.t7d().m93(this.xph_1.c9n_1, this.yph_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.wph_1.e7g();
            suspendResult = tmp_0.l9m(1, this.xph_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).jo1 = function (it, completion) {
    var i = new ClazzInviteRedeemUseCase$invoke$slambda(this.wph_1, this.xph_1, this.yph_1, completion);
    i.zph_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$33(_this__u8e3s4, inviteCode, isAccepting, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ipi_1 = _this__u8e3s4;
    this.jpi_1 = inviteCode;
    this.kpi_1 = isAccepting;
    this.lpi_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.ipi_1.spi_1;
            tmp_0.mpi_1 = tmp0_elvis_lhs == null ? this.ipi_1.rpi_1 : tmp0_elvis_lhs;
            this.hd_1 = 1;
            suspendResult = this.mpi_1.e7g().j9m(this.jpi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.npi_1 = suspendResult;
            var tmp_1 = this;
            var tmp1_safe_receiver = this.npi_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().xnp_1);
            } else {
              tmp_2 = tmp2_elvis_lhs;
            }

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

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

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

            if (this.kpi_1) {
              this.hd_1 = 3;
              var tmp_5 = ClazzEnrolment_init_$Create$(this.opi_1.f9n_1, this.lpi_1, this.opi_1.e9n_1.mb());
              var tmp3_elvis_lhs = this.npi_1.o9n_1;
              suspendResult = this.ipi_1.qpi_1.xp1(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.mpi_1.e7g();
              suspendResult = tmp_6.l9m(2, this.opi_1.c9n_1, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            return new ClazzRedeemResult(this.ipi_1.tpi_1.vol(strings_getInstance().cnt_1));
          case 3:
            this.ppi_1 = suspendResult;
            this.hd_1 = 4;
            suspendResult = withDoorTransactionAsync(this.mpi_1, VOID, ClazzInviteRedeemUseCase$invoke$slambda_0(this.mpi_1, this.opi_1, this.ppi_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            return new ClazzRedeemResult(this.ipi_1.tpi_1.vol(strings_getInstance().ant_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.qpi_1 = enrolIntoCourseUseCase;
    this.rpi_1 = db;
    this.spi_1 = repo;
    this.tpi_1 = systemImpl;
  }
  protoOf(ClazzInviteRedeemUseCase).upi = 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.vpi_1 = message;
  }
  protoOf(ClazzRedeemResult).toString = function () {
    return 'ClazzRedeemResult(message=' + this.vpi_1 + ')';
  };
  protoOf(ClazzRedeemResult).hashCode = function () {
    return getStringHashCode(this.vpi_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.vpi_1 === tmp0_other_with_cast.vpi_1))
      return false;
    return true;
  };
  function $invokeCOROUTINE$34(_this__u8e3s4, viewUri, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.epj_1 = _this__u8e3s4;
    this.fpj_1 = viewUri;
    this.gpj_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.hpj_1 = indexOf(this.fpj_1, _Char___init__impl__6a9atx(63));
            var tmp_0 = this;
            var tmp_1;
            if (this.hpj_1 > 0) {
              var tmp_2 = UMFileUtil_getInstance();
              var this_0 = this.fpj_1;
              var startIndex = this.hpj_1;
              tmp_1 = tmp_2.parseURLQueryString(this_0.substring(startIndex));
            } else {
              tmp_1 = emptyMap();
            }

            tmp_0.ipj_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.epj_1.jpj_1.upi(first_1(this.ipj_1.p2()), true, this.gpj_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.jpj_1 = clazzInviteRedeemUseCase;
  }
  protoOf(EnrollToCourseFromInviteCodeUseCase).kpj = 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.lpj_1 = phoneNumValidatorUseCase;
    this.mpj_1 = validateEmailUseCase;
  }
  protoOf(ParseInviteUseCase).zpb = 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.mpj_1.zpb(item_0) == null)) {
        tmp = new InviteViaContactChip(item_0, true, 1);
      } else if (this.lpj_1.npj(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_49() {
    Companion_instance_98 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.opj_1 = [new ArrayListSerializer(StringSerializer_getInstance()), null, null, null];
  }
  protoOf(Companion_49).n4r = function () {
    return $serializer_getInstance_54();
  };
  var Companion_instance_98;
  function Companion_getInstance_66() {
    if (Companion_instance_98 == null)
      new Companion_49();
    return Companion_instance_98;
  }
  function $serializer_42() {
    $serializer_instance_42 = 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.ppj_1 = tmp0_serialDesc;
  }
  protoOf($serializer_42).q44 = function () {
    return this.ppj_1;
  };
  protoOf($serializer_42).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_66().opj_1[0], LongSerializer_getInstance(), LongSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_42).s44 = function (decoder) {
    var tmp0_desc = this.ppj_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_66().opj_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_42).qpj = function (encoder, value) {
    var tmp0_desc = this.ppj_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_66().opj_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.rpj_1);
    tmp1_output.s49(tmp0_desc, 1, value.spj_1);
    tmp1_output.s49(tmp0_desc, 2, value.tpj_1);
    tmp1_output.s49(tmp0_desc, 3, value.upj_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_42).r44 = function (encoder, value) {
    return this.qpj(encoder, value instanceof SendClazzInvitesRequest ? value : THROW_CCE());
  };
  var $serializer_instance_42;
  function $serializer_getInstance_54() {
    if ($serializer_instance_42 == null)
      new $serializer_42();
    return $serializer_instance_42;
  }
  function SendClazzInvitesRequest_init_$Init$(seen1, contacts, clazzUid, role, personUid, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_54().ppj_1);
    }
    $this.rpj_1 = contacts;
    $this.spj_1 = clazzUid;
    $this.tpj_1 = role;
    $this.upj_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_66();
    this.rpj_1 = contacts;
    this.spj_1 = clazzUid;
    this.tpj_1 = role;
    this.upj_1 = personUid;
  }
  protoOf(SendClazzInvitesRequest).toString = function () {
    return 'SendClazzInvitesRequest(contacts=' + this.rpj_1 + ', clazzUid=' + this.spj_1.toString() + ', role=' + this.tpj_1.toString() + ', personUid=' + this.upj_1.toString() + ')';
  };
  protoOf(SendClazzInvitesRequest).hashCode = function () {
    var result = hashCode(this.rpj_1);
    result = imul(result, 31) + this.spj_1.hashCode() | 0;
    result = imul(result, 31) + this.tpj_1.hashCode() | 0;
    result = imul(result, 31) + this.upj_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.rpj_1, tmp0_other_with_cast.rpj_1))
      return false;
    if (!this.spj_1.equals(tmp0_other_with_cast.spj_1))
      return false;
    if (!this.tpj_1.equals(tmp0_other_with_cast.tpj_1))
      return false;
    if (!this.upj_1.equals(tmp0_other_with_cast.upj_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.epk_1 = _this__u8e3s4;
    this.fpk_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.gpk_1 = this.epk_1.npk_1;
            var tmp_1 = this;
            tmp_1.hpk_1 = this.epk_1.opk_1.xnv_1 + 'api/invite/sendclazzinvites';
            var tmp_2 = this;
            tmp_2.ipk_1 = this.gpk_1;
            var tmp_3 = this;
            tmp_3.jpk_1 = this.ipk_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.hpk_1);
            contentType(this_0, Application_getInstance().v2r_1);
            setBodyJson(this_0, this.epk_1.ppk_1, Companion_getInstance_66().n4r(), this.fpk_1);
            tmp_4.kpk_1 = this_0;
            this.kpk_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_5 = this;
            tmp_5.lpk_1 = this.jpk_1;
            var tmp_6 = this;
            tmp_6.mpk_1 = this.kpk_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.mpk_1, this.lpk_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.npk_1 = httpClient;
    this.opk_1 = learningSpace;
    this.ppk_1 = json;
  }
  protoOf(SendClazzInvitesUseCaseSendToServerImpl).vpj = 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.qpk_1 = waitForRestart;
  }
  protoOf(SetLangResult).toString = function () {
    return 'SetLangResult(waitForRestart=' + this.qpk_1 + ')';
  };
  protoOf(SetLangResult).hashCode = function () {
    return getBooleanHashCode(this.qpk_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.qpk_1 === tmp0_other_with_cast.qpk_1))
      return false;
    return true;
  };
  function SetLanguageUseCase() {
  }
  function LaunchOpenLicensesUseCase() {
  }
  function GoToLearningSpaceUseCase() {
  }
  function GetLocalAccountsSupportedUseCase(localAccountsSupported) {
    this.upk_1 = localAccountsSupported;
  }
  protoOf(GetLocalAccountsSupportedUseCase).cph = function () {
    return this.upk_1;
  };
  function MakeLinkUseCase(learningSpace) {
    this.vpk_1 = learningSpace;
  }
  protoOf(MakeLinkUseCase).wpk = function (destName, args) {
    var tmp = UMFileUtil_getInstance();
    Companion_getInstance_97();
    return appendQueryArgs_0(tmp.xpk([this.vpk_1.xnv_1, '/umapp/#/']) + destName, toQueryString(args));
  };
  function GetDefaultDestinationUseCase(systemUrlConfig, learningSpace) {
    this.ypk_1 = systemUrlConfig;
    this.zpk_1 = learningSpace;
  }
  protoOf(GetDefaultDestinationUseCase).cph = function () {
    var tmp;
    if (this.zpk_1.xnv_1 === this.ypk_1.ho8_1 ? true : this.zpk_1.cnw()) {
      Companion_getInstance_170();
      tmp = 'ContentEntryListHome';
    } else {
      Companion_getInstance_141();
      tmp = 'CourseListHome';
    }
    return tmp;
  };
  function OnClickLinkUseCase_init_$Init$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig, $this) {
    OnClickLinkUseCase.call($this, navController, accountManager, openExternalLinkUseCase, apiUrlConfig.ko8_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.apl_1 = navController;
    this.bpl_1 = accountManager;
    this.cpl_1 = openExternalLinkUseCase;
    this.dpl_1 = userCanSelectServer;
  }
  protoOf(OnClickLinkUseCase).epl = function (link, target) {
    navigateToLink(this.apl_1, link, this.bpl_1, this.cpl_1, VOID, VOID, this.dpl_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).cmi = 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.npl_1 = _this__u8e3s4;
    this.opl_1 = existingAllocations;
    this.ppl_1 = groupUid;
    this.qpl_1 = clazzUid;
    this.rpl_1 = assignmentUid;
    this.spl_1 = numReviewsPerSubmission;
    this.tpl_1 = allocateRemaining;
    this.upl_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.npl_1.opm_1.q7e().m7s(this.qpl_1, this.ppl_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vpl_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.wpl_1 = this.vpl_1;
            var tmp_1 = this;
            tmp_1.xpl_1 = this.wpl_1;
            var tmp_2 = this;
            tmp_2.ypl_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.wpl_1, 10));
            this.zpl_1 = this.xpl_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.zpl_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.apm_1 = this.zpl_1.e();
            var tmp_3 = this;
            tmp_3.bpm_1 = this.apm_1;
            var tmp_4 = this;
            tmp_4.cpm_1 = this.npl_1;
            var tmp_5 = this;
            var this_0 = this.opl_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.bpm_1)) {
                destination.i1(element);
              }
            }

            tmp_5.dpm_1 = this.npl_1.qpm(destination, this.spl_1);
            var tmp_6 = this;
            tmp_6.epm_1 = this.spl_1;
            if (this.dpm_1.u() >= this.epm_1) {
              this.fpm_1 = this.dpm_1;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_7 = this;
              tmp_7.gpm_1 = until(0, this.epm_1 - this.dpm_1.u() | 0);
              var tmp_8 = this;
              tmp_8.hpm_1 = this.gpm_1;
              var tmp_9 = this;
              tmp_9.ipm_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.gpm_1, 10));
              this.jpm_1 = this.hpm_1.w();
              this.hd_1 = 3;
              continue $sm;
            }

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

            this.kpm_1 = this.jpm_1.e();
            var tmp_10 = this;
            tmp_10.lpm_1 = this.kpm_1;
            var tmp_11 = this;
            tmp_11.mpm_1 = new PeerReviewerAllocation();
            var tmp_12 = this;
            tmp_12.npm_1 = this.mpm_1;
            this.hd_1 = 4;
            var tmp_13 = get_doorPrimaryKeyManager(this.npl_1.opm_1);
            suspendResult = tmp_13.o62(140, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var ARGUMENT = suspendResult;
            this.npm_1.nfu_1 = ARGUMENT;
            this.npm_1.pfu_1 = this.bpm_1;
            this.npm_1.qfu_1 = this.rpl_1;
            var ARGUMENT_0 = this.mpm_1;
            this.ipm_1.i1(ARGUMENT_0);
            this.hd_1 = 3;
            continue $sm;
          case 5:
            var ARGUMENT_1 = this.ipm_1;
            this.fpm_1 = plus(this.dpm_1, ARGUMENT_1);
            this.hd_1 = 6;
            continue $sm;
          case 6:
            var existingAllocationsForSubmitter = this.fpm_1;
            var ARGUMENT_2 = to(this.bpm_1, existingAllocationsForSubmitter);
            this.ypl_1.i1(ARGUMENT_2);
            this.hd_1 = 2;
            continue $sm;
          case 7:
            var ARGUMENT_3 = this.ypl_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.upl_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).tkr(VOID, new Long(0, 0)));
                }
                 while (inductionVariable <= last);
            }

            if (this.tpl_1) {
              var this_1 = this.vpl_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.spl_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.opm_1 = db;
    this.ppm_1 = systemImpl;
  }
  protoOf(UpdatePeerReviewAllocationUseCase).qpm = function (_this__u8e3s4, maxSize) {
    return _this__u8e3s4.u() <= maxSize ? _this__u8e3s4 : _this__u8e3s4.z(0, maxSize);
  };
  protoOf(UpdatePeerReviewAllocationUseCase).rpm = 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).spm = function (existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion, $super) {
    resetAllocations = resetAllocations === VOID ? false : resetAllocations;
    return $super === VOID ? this.rpm(existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion) : $super.rpm.call(this, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion);
  };
  function AddNewPersonUseCase$invoke$slambda($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, $relationship, resultContinuation) {
    this.bpn_1 = $effectiveDb;
    this.cpn_1 = $person;
    this.dpn_1 = $systemPermissions;
    this.epn_1 = $createPersonParentApprovalIfMinor;
    this.fpn_1 = $addedByPersonUid;
    this.gpn_1 = $relationship;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddNewPersonUseCase$invoke$slambda).rom = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.rom(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.bpn_1.n7d().insertAsync(this.cpn_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ipn_1 = suspendResult;
            this.jpn_1 = this.cpn_1.f96_1.equals(new Long(0, 0)) ? this.ipn_1 : this.cpn_1.f96_1;
            this.hd_1 = 2;
            suspendResult = this.bpn_1.p7f().di2(new SystemPermission(VOID, this.jpn_1, VOID, this.dpn_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (isDateOfBirthAMinor(Companion_getInstance_6().mmi(this.cpn_1.o96_1)) ? this.epn_1 : false) {
              this.hd_1 = 3;
              var tmp_0 = this.bpn_1.x7e();
              var tmp1_ppjApprovalTiemstamp = systemTimeInMillis();
              suspendResult = tmp_0.ugs(new PersonParentJoin(VOID, VOID, VOID, VOID, VOID, this.fpn_1, this.jpn_1, this.gpn_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.jpn_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).jo1 = function (it, completion) {
    var i = new AddNewPersonUseCase$invoke$slambda(this.bpn_1, this.cpn_1, this.dpn_1, this.epn_1, this.fpn_1, this.gpn_1, completion);
    i.hpn_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.rom(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddNewPersonUseCase(db, repo) {
    this.kpn_1 = db;
    this.lpn_1 = repo;
  }
  protoOf(AddNewPersonUseCase).mpn = function (person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion) {
    var tmp0_elvis_lhs = this.lpn_1;
    var effectiveDb = tmp0_elvis_lhs == null ? this.kpn_1 : tmp0_elvis_lhs;
    return withDoorTransactionAsync(effectiveDb, VOID, AddNewPersonUseCase$invoke$slambda_0(effectiveDb, person, systemPermissions, createPersonParentApprovalIfMinor, addedByPersonUid, relationship, null), $completion);
  };
  protoOf(AddNewPersonUseCase).npn = 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.mpn(person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion) : $super.mpn.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.opn_1 = errors;
  }
  protoOf(BulkAddPersonException).toString = function () {
    var tmp0_elvis_lhs = this.message;
    return (tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs) + ' ' + joinToString(this.opn_1);
  };
  function $serializer_43() {
    $serializer_instance_43 = 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.ppn_1 = tmp0_serialDesc;
  }
  protoOf($serializer_43).q44 = function () {
    return this.ppn_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(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_43).s44 = function (decoder) {
    var tmp0_desc = this.ppn_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_43).qpn = function (encoder, value) {
    var tmp0_desc = this.ppn_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.r49(tmp0_desc, 0, value.rpn_1);
    tmp1_output.w49(tmp0_desc, 1, value.spn_1);
    tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.tpn_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_43).r44 = function (encoder, value) {
    return this.qpn(encoder, value instanceof BulkAddPersonsDataError ? value : THROW_CCE());
  };
  var $serializer_instance_43;
  function $serializer_getInstance_55() {
    if ($serializer_instance_43 == null)
      new $serializer_43();
    return $serializer_instance_43;
  }
  function BulkAddPersonsDataError_init_$Init$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_55().ppn_1);
    }
    $this.rpn_1 = lineNum;
    $this.spn_1 = colName;
    $this.tpn_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.rpn_1 + ', colName=' + this.spn_1 + ', invalidValue=' + this.tpn_1 + ')';
  };
  protoOf(BulkAddPersonsDataError).hashCode = function () {
    var result = this.rpn_1;
    result = imul(result, 31) + getStringHashCode(this.spn_1) | 0;
    result = imul(result, 31) + (this.tpn_1 == null ? 0 : getStringHashCode(this.tpn_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.rpn_1 === tmp0_other_with_cast.rpn_1))
      return false;
    if (!(this.spn_1 === tmp0_other_with_cast.spn_1))
      return false;
    if (!(this.tpn_1 == tmp0_other_with_cast.tpn_1))
      return false;
    return true;
  };
  function BulkAddPersonsFromLocalUriUseCase() {
  }
  function Companion_51() {
  }
  var Companion_instance_100;
  function Companion_getInstance_68() {
    return Companion_instance_100;
  }
  function $serializer_44() {
    $serializer_instance_44 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.person.bulkadd.BulkAddPersonsUseCase.BulkAddUsersResult', this, 1);
    tmp0_serialDesc.t4f('numImported', false);
    this.vpn_1 = tmp0_serialDesc;
  }
  protoOf($serializer_44).q44 = function () {
    return this.vpn_1;
  };
  protoOf($serializer_44).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance()];
  };
  protoOf($serializer_44).s44 = function (decoder) {
    var tmp0_desc = this.vpn_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_44).wpn = function (encoder, value) {
    var tmp0_desc = this.vpn_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.r49(tmp0_desc, 0, value.xpn_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_44).r44 = function (encoder, value) {
    return this.wpn(encoder, value instanceof BulkAddUsersResult ? value : THROW_CCE());
  };
  var $serializer_instance_44;
  function $serializer_getInstance_56() {
    if ($serializer_instance_44 == null)
      new $serializer_44();
    return $serializer_instance_44;
  }
  function BulkAddUsersResult_init_$Init$(seen1, numImported, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_56().vpn_1);
    }
    $this.xpn_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.xpn_1 = numImported;
  }
  protoOf(BulkAddUsersResult).toString = function () {
    return 'BulkAddUsersResult(numImported=' + this.xpn_1 + ')';
  };
  protoOf(BulkAddUsersResult).hashCode = function () {
    return this.xpn_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.xpn_1 === tmp0_other_with_cast.xpn_1))
      return false;
    return true;
  };
  function IPhoneNumberUtil() {
  }
  function formatInternationalOrNull(_this__u8e3s4, number) {
    var tmp;
    try {
      tmp = _this__u8e3s4.zpn(_this__u8e3s4.ypn(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.apo_1 = showPoweredBy;
  }
  protoOf(GetShowPoweredByUseCase).cph = function () {
    return this.apo_1;
  };
  function Companion_52() {
    this.bpo_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.kpo_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.lpo_1 = plus(listOf_0(this.kpo_1.tpo_1.spo_1), this.kpo_1.tpo_1.mpo_1);
            this.hd_1 = 1;
            suspendResult = this.kpo_1.upo_1.w7e().nht(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.lpo_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.tpo_1 = supportedLangConfig;
    this.upo_1 = repo;
  }
  protoOf(GetLocaleForSiteTermsUseCase).vpo = 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.wpo_1 = 'dismissed-social-warning-';
  }
  var Companion_instance_102;
  function Companion_getInstance_70() {
    return Companion_instance_102;
  }
  function DismissSocialWarningUseCase(settings) {
    this.xpo_1 = settings;
  }
  protoOf(DismissSocialWarningUseCase).bp4 = function (username) {
    var key = 'dismissed-social-warning-' + (username == null ? 'guest' : username);
    // Inline function 'com.russhwolf.settings.set' call
    this.xpo_1.gm9(key, true);
  };
  function Companion_54() {
    this.ypo_1 = 'dismissed-social-warning-';
    this.zpo_1 = 'https://beinternetawesome.withgoogle.com';
  }
  var Companion_instance_103;
  function Companion_getInstance_71() {
    return Companion_instance_103;
  }
  function ShowSocialWarningUseCase(settings) {
    this.app_1 = settings;
  }
  protoOf(ShowSocialWarningUseCase).zpb = function (username) {
    var key = 'dismissed-social-warning-' + (username == null ? 'guest' : username);
    return !this.app_1.hm9(key, false);
  };
  function GetOfflineStorageAvailableSpace() {
  }
  function Companion_55() {
    this.cpp_1 = 'offlineStoragePath';
  }
  var Companion_instance_104;
  function Companion_getInstance_72() {
    return Companion_instance_104;
  }
  function GetOfflineStorageOptionsUseCase() {
  }
  function GetOfflineStorageSettingUseCase(getOfflineStorageOptionsUseCase, settings) {
    this.dpp_1 = getOfflineStorageOptionsUseCase;
    this.epp_1 = settings;
  }
  protoOf(GetOfflineStorageSettingUseCase).cph = function () {
    var setting = this.epp_1.fm9('offlineStoragePath');
    var options = this.dpp_1.cph();
    // Inline function 'kotlin.takeIf' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.domain.storage.GetOfflineStorageSettingUseCase.invoke.<anonymous>' call
    if (!(setting == null)) {
      tmp = options;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      var tmp$ret$3;
      $l$block: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator = tmp0_safe_receiver.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.domain.storage.GetOfflineStorageSettingUseCase.invoke.<anonymous>' call
          if (element.gpp_1 === setting) {
            tmp$ret$3 = element;
            break $l$block;
          }
        }
        tmp$ret$3 = null;
      }
      tmp_0 = tmp$ret$3;
    }
    var tmp1_elvis_lhs = tmp_0;
    return tmp1_elvis_lhs == null ? first_0(options) : tmp1_elvis_lhs;
  };
  function OfflineStorageOption() {
  }
  protoOf(OfflineStorageOption).hashCode = function () {
    var result = this.fpp_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.gpp_1) | 0;
    return result;
  };
  protoOf(OfflineStorageOption).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OfflineStorageOption))
      return false;
    var tmp0_other_with_cast = other instanceof OfflineStorageOption ? other : THROW_CCE();
    if (!this.fpp_1.equals(tmp0_other_with_cast.fpp_1))
      return false;
    if (!(this.gpp_1 === tmp0_other_with_cast.gpp_1))
      return false;
    return true;
  };
  function SetOfflineStorageSettingUseCase(settings) {
    this.hpp_1 = settings;
  }
  function DeleteUrisUseCase() {
  }
  function IsTempFileCheckerUseCase() {
  }
  function ChunkIterator(chunkInfo) {
    this.ipp_1 = chunkInfo;
    this.jpp_1 = 0;
  }
  protoOf(ChunkIterator).f = function () {
    return this.jpp_1 < this.ipp_1.opp_1;
  };
  protoOf(ChunkIterator).e = function () {
    // Inline function 'kotlin.also' call
    var this_0 = this.ipp_1.v(this.jpp_1);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.upload.ChunkIterator.next.<anonymous>' call
    this.jpp_1 = this.jpp_1 + 1 | 0;
    return this_0;
  };
  function Chunk(start, end, isLastChunk, size) {
    size = size === VOID ? end.mc(start).mb() : size;
    this.ppp_1 = start;
    this.qpp_1 = end;
    this.rpp_1 = isLastChunk;
    this.spp_1 = size;
  }
  protoOf(Chunk).toString = function () {
    return 'Chunk(start=' + this.ppp_1.toString() + ', end=' + this.qpp_1.toString() + ', isLastChunk=' + this.rpp_1 + ', size=' + this.spp_1 + ')';
  };
  protoOf(Chunk).hashCode = function () {
    var result = this.ppp_1.hashCode();
    result = imul(result, 31) + this.qpp_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rpp_1) | 0;
    result = imul(result, 31) + this.spp_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.ppp_1.equals(tmp0_other_with_cast.ppp_1))
      return false;
    if (!this.qpp_1.equals(tmp0_other_with_cast.qpp_1))
      return false;
    if (!(this.rpp_1 === tmp0_other_with_cast.rpp_1))
      return false;
    if (!(this.spp_1 === tmp0_other_with_cast.spp_1))
      return false;
    return true;
  };
  function ChunkInfo(totalSize, chunkSize, fromByte) {
    fromByte = fromByte === VOID ? new Long(0, 0) : fromByte;
    this.kpp_1 = totalSize;
    this.lpp_1 = chunkSize;
    this.mpp_1 = fromByte;
    this.npp_1 = this.kpp_1.mc(this.mpp_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.npp_1;
    var other = this.lpp_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.npp_1;
    var other_0 = this.lpp_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.opp_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.lpp_1)).lc(this.mpp_1);
    // Inline function 'kotlin.math.min' call
    // Inline function 'kotlin.Long.plus' call
    var other = this.lpp_1;
    var a = start.lc(toLong(other));
    var b = this.kpp_1;
    var end = a.c7(b) <= 0 ? a : b;
    var isLastChunk = index === (this.opp_1 - 1 | 0);
    return new Chunk(start, end, isLastChunk);
  };
  function UploadProgress(bytesTransferred, totalBytes) {
    this.tpp_1 = bytesTransferred;
    this.upp_1 = totalBytes;
  }
  protoOf(UploadProgress).toString = function () {
    return 'UploadProgress(bytesTransferred=' + this.tpp_1.toString() + ', totalBytes=' + this.upp_1.toString() + ')';
  };
  protoOf(UploadProgress).hashCode = function () {
    var result = this.tpp_1.hashCode();
    result = imul(result, 31) + this.upp_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.tpp_1.equals(tmp0_other_with_cast.tpp_1))
      return false;
    if (!this.upp_1.equals(tmp0_other_with_cast.upp_1))
      return false;
    return true;
  };
  function LastChunkResponse(body, statusCode, headers) {
    this.vpp_1 = body;
    this.wpp_1 = statusCode;
    this.xpp_1 = headers;
  }
  protoOf(LastChunkResponse).toString = function () {
    return 'LastChunkResponse(body=' + this.vpp_1 + ', statusCode=' + this.wpp_1 + ', headers=' + this.xpp_1 + ')';
  };
  protoOf(LastChunkResponse).hashCode = function () {
    var result = this.vpp_1 == null ? 0 : getStringHashCode(this.vpp_1);
    result = imul(result, 31) + this.wpp_1 | 0;
    result = imul(result, 31) + hashCode(this.xpp_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.vpp_1 == tmp0_other_with_cast.vpp_1))
      return false;
    if (!(this.wpp_1 === tmp0_other_with_cast.wpp_1))
      return false;
    if (!equals(this.xpp_1, tmp0_other_with_cast.xpp_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_56() {
    this.apq_1 = 524288;
  }
  var Companion_instance_105;
  function Companion_getInstance_73() {
    return Companion_instance_105;
  }
  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.jpq_1 = _this__u8e3s4;
    this.kpq_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.lpq_1 = this.jpq_1.rpq_1;
            var tmp_1 = this;
            tmp_1.mpq_1 = this.lpq_1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, removeSuffix(this.jpq_1.spq_1.xnv_1, '/') + '/api/username/getsuggestion');
            parameter(this_0, 'name', this.kpq_1);
            tmp_2.npq_1 = this_0;
            this.npq_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_3 = this;
            tmp_3.opq_1 = this.mpq_1;
            var tmp_4 = this;
            tmp_4.ppq_1 = this.npq_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.ppq_1, this.opq_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qpq_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.qpq_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.rpq_1 = httpClient;
    this.spq_1 = learningSpace;
  }
  protoOf(GetUsernameSuggestionUseCase).tpq = 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.upq_1 = accountManager;
  }
  protoOf(StartUserSessionUseCase).vpq = function (session, nextDest, navController, goOptions, dontSetCurrentSession) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.upq_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.znz(session);
    }
    navigateToViewUri(navController, appendSelectedAccount(nextDest, session.znw_1.f96_1, session.anx_1), goOptions);
  };
  protoOf(StartUserSessionUseCase).wpq = function (session, nextDest, navController, goOptions, dontSetCurrentSession, $super) {
    var tmp;
    if (nextDest === VOID) {
      Companion_getInstance_141();
      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.vpq(session, nextDest, navController, goOptions, dontSetCurrentSession);
      tmp_0 = Unit_instance;
    } else {
      tmp_0 = $super.vpq.call(this, session, nextDest, navController, goOptions, dontSetCurrentSession);
    }
    return tmp_0;
  };
  function ValidateEmailUseCase() {
  }
  protoOf(ValidateEmailUseCase).zpb = 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_57() {
    Companion_instance_106 = this;
    this.vpg_1 = 3;
    this.wpg_1 = 30;
    this.xpg_1 = setOf([new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(95))]);
  }
  protoOf(Companion_57).xpq = function (character) {
    return isLetter(character) ? true : isDigit(character) ? true : this.xpg_1.a1(new Char(character)) ? true : false;
  };
  var Companion_instance_106;
  function Companion_getInstance_74() {
    if (Companion_instance_106 == null)
      new Companion_57();
    return Companion_instance_106;
  }
  function ValidateUsernameUseCase() {
    Companion_getInstance_74();
  }
  protoOf(ValidateUsernameUseCase).zpb = function (username) {
    var tmp;
    if (username.length < 3) {
      tmp = Companion_getInstance_75().zpq_1;
    } else {
      if (username.length > 30) {
        tmp = Companion_getInstance_75().apr_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_75().bpr_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_74().xpq(element)) {
                tmp$ret$1 = false;
                break $l$block;
              }
            }
            tmp$ret$1 = true;
          }
          if (!tmp$ret$1) {
            tmp = Companion_getInstance_75().cpr_1;
          } else {
            tmp = Companion_getInstance_75().ypq_1;
          }
        }
      }
    }
    return tmp;
  };
  function Companion_58() {
    Companion_instance_107 = this;
    this.ypq_1 = new ValidationResult();
    this.zpq_1 = new ValidationResult(strings_getInstance().gn9_1);
    this.apr_1 = new ValidationResult(strings_getInstance().hn9_1);
    this.bpr_1 = new ValidationResult(strings_getInstance().in9_1);
    this.cpr_1 = new ValidationResult(strings_getInstance().jn9_1);
  }
  var Companion_instance_107;
  function Companion_getInstance_75() {
    if (Companion_instance_107 == null)
      new Companion_58();
    return Companion_instance_107;
  }
  function ValidationResult(errorMessage) {
    Companion_getInstance_75();
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.dpr_1 = errorMessage;
  }
  protoOf(ValidationResult).toString = function () {
    return 'ValidationResult(errorMessage=' + this.dpr_1 + ')';
  };
  protoOf(ValidationResult).hashCode = function () {
    return this.dpr_1 == null ? 0 : this.dpr_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.dpr_1, tmp0_other_with_cast.dpr_1))
      return false;
    return true;
  };
  function isAnonymous(_this__u8e3s4) {
    return ((_this__u8e3s4.ej5_1 == null ? _this__u8e3s4.cj5_1 == null : false) ? _this__u8e3s4.fj5_1 == null : false) ? _this__u8e3s4.dj5_1 == null : false;
  }
  function _get_isIdOnly__t0wrie(_this__u8e3s4, $this) {
    var tmp;
    var tmp_0;
    if (_this__u8e3s4.bir_1 == null ? _this__u8e3s4.cir_1 == null : false) {
      var tmp_1 = _this__u8e3s4.dir_1;
      tmp_0 = tmp_1 === 0;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = _this__u8e3s4.eir_1 == null;
    } else {
      tmp = false;
    }
    return tmp;
  }
  function StoreActivitiesUseCase$invoke$slambda($activityEntities, $timeNow, this$0, resultContinuation) {
    this.mpr_1 = $activityEntities;
    this.npr_1 = $timeNow;
    this.opr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(StoreActivitiesUseCase$invoke$slambda).vps = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.vps(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.mpr_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.wps_1.nl1(VOID, VOID, VOID, VOID, VOID, VOID, this.npr_1));
            }

            tmp_0.qpr_1 = destination;
            this.hd_1 = 1;
            suspendResult = this.opr_1.cpt_1.h7e().uiq(this.qpr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var this_1 = this.qpr_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.opr_1)) {
                destination_0.i1(element);
              }
            }

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

            this.tpr_1 = this.spr_1.e();
            var tmp_2 = this;
            tmp_2.upr_1 = this.tpr_1;
            this.hd_1 = 3;
            suspendResult = this.opr_1.cpt_1.h7e().viq(this.upr_1.ziq_1, this.upr_1.cir_1, this.npr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 4;
            suspendResult = this.opr_1.cpt_1.h7e().wiq(this.upr_1.ziq_1, this.upr_1.bir_1, this.upr_1.cir_1, this.upr_1.dir_1, this.upr_1.eir_1, this.npr_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.mpr_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.xps_1;
              addAll(destination_1, list);
            }

            tmp_3.vpr_1 = destination_1;
            var tmp_4 = this;
            var this_3 = this.mpr_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.yps_1;
              addAll(destination_2, list_0);
            }

            tmp_4.wpr_1 = destination_2;
            this.hd_1 = 6;
            var tmp_5 = this.opr_1.bpt_1.w7f();
            var this_4 = this.wpr_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.miw_1);
            }

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

            continue $sm;
          case 6:
            this.xpr_1 = suspendResult;
            this.ypr_1 = toSet(this.xpr_1);
            this.hd_1 = 7;
            var tmp_6 = this.opr_1.cpt_1.w7f();
            var this_5 = this.wpr_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.ypr_1.a1(element_2.miw_1)) {
                destination_4.i1(element_2);
              }
            }

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

            continue $sm;
          case 7:
            var tmp_7 = this;
            var this_6 = this.vpr_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.siy_1.equals(new Long(0, 0))) {
                first.i1(element_3);
              } else {
                second.i1(element_3);
              }
            }

            tmp_7.zpr_1 = new Pair(first, second);
            this.aps_1 = this.zpr_1.y6();
            this.bps_1 = this.zpr_1.z6();
            this.hd_1 = 8;
            suspendResult = this.opr_1.cpt_1.v7f().hiy(this.aps_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            var tmp_8 = this;
            tmp_8.cps_1 = this.bps_1;
            this.dps_1 = this.cps_1.w();
            this.hd_1 = 9;
            continue $sm;
          case 9:
            if (!this.dps_1.f()) {
              this.hd_1 = 11;
              continue $sm;
            }

            this.eps_1 = this.dps_1.e();
            var tmp_9 = this;
            tmp_9.fps_1 = this.eps_1;
            this.gps_1 = this.opr_1.cpt_1.v7f();
            this.hps_1 = this.fps_1.niy_1;
            this.ips_1 = this.fps_1.siy_1;
            this.jps_1 = this.fps_1.qiy_1;
            this.kps_1 = this.fps_1.riy_1;
            this.lps_1 = this.fps_1.piy_1;
            this.mps_1 = this.fps_1.oiy_1;
            this.hd_1 = 10;
            suspendResult = this.gps_1.iiy(this.hps_1, this.mps_1, this.jps_1, this.lps_1, this.kps_1, this.ips_1, this.npr_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.nps_1 = this.vpr_1;
            this.ops_1 = this.nps_1.w();
            this.hd_1 = 12;
            continue $sm;
          case 12:
            if (!this.ops_1.f()) {
              this.hd_1 = 14;
              continue $sm;
            }

            this.pps_1 = this.ops_1.e();
            var tmp_11 = this;
            tmp_11.qps_1 = this.pps_1;
            this.hd_1 = 13;
            suspendResult = this.opr_1.cpt_1.v7f().jiy(this.qps_1.niy_1, this.qps_1.oiy_1, this.qps_1.riy_1, this.npr_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.opr_1.cpt_1.x7f();
            var this_7 = this.mpr_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.zps_1;
              addAll(destination_5, list_1);
            }

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

            continue $sm;
          case 15:
            var tmp_13 = this;
            var this_8 = this.mpr_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.apt_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.rps_1 = tmp_14;
            if (this.rps_1 == null) {
              this.sps_1 = null;
              this.hd_1 = 17;
              continue $sm;
            } else {
              var tmp_15 = this;
              tmp_15.tps_1 = this.rps_1;
              var tmp_16 = this;
              tmp_16.ups_1 = this.tps_1;
              this.hd_1 = 16;
              suspendResult = this.opr_1.cpt_1.y7f().mje(this.ups_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 16:
            this.sps_1 = this.tps_1;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            return this.sps_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).jo1 = function (it, completion) {
    var i = new StoreActivitiesUseCase$invoke$slambda(this.mpr_1, this.npr_1, this.opr_1, completion);
    i.ppr_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.vps(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$42(_this__u8e3s4, activityEntities, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lpt_1 = _this__u8e3s4;
    this.mpt_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.npt_1 = systemTimeInMillis();
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.lpt_1.cpt_1, VOID, StoreActivitiesUseCase$invoke$slambda_0(this.mpt_1, this.npt_1, this.lpt_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.bpt_1 = db;
    var tmp = this;
    tmp.cpt_1 = repo == null ? this.bpt_1 : repo;
  }
  protoOf(StoreActivitiesUseCase).opt = 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.ppt_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.qpt_1 = json;
  }
  protoOf(XapiJson).toString = function () {
    return 'XapiJson(json=' + this.qpt_1 + ')';
  };
  protoOf(XapiJson).hashCode = function () {
    return hashCode(this.qpt_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.qpt_1, tmp0_other_with_cast.qpt_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).lmi();
    } 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.rpt_1 = statementUuids;
  }
  protoOf(StatementStoreResult).toString = function () {
    return 'StatementStoreResult(statementUuids=' + this.rpt_1 + ')';
  };
  protoOf(StatementStoreResult).hashCode = function () {
    return hashCode(this.rpt_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.rpt_1, tmp0_other_with_cast.rpt_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.opu_1 = $statementEntities;
    this.ppu_1 = this$0;
    this.qpu_1 = $xapiSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(XapiStatementResource$storeStatements$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(XapiStatementResource$storeStatements$slambda).he = function (p1, $completion) {
    return this.io1(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.opu_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.lpv_1;
                var tmp_1;
                if (tmp0_safe_receiver == null) {
                  tmp_1 = null;
                } else {
                  tmp_1 = tmp0_safe_receiver.djh_1 ? tmp0_safe_receiver.ljg_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.spu_1 = this.ppu_1.don_1.z7f();
              this.tpu_1 = this.qpu_1.nk0_1;
              this.upu_1 = systemTimeInMillis();
              this.hd_1 = 1;
              suspendResult = this.spu_1.fk0(true, this.upu_1, this.tpu_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.ppu_1.don_1.j7e();
            var this_1 = this.opu_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.lpv_1;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination.i1(tmp0_safe_receiver_0);
              }
            }

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

            continue $sm;
          case 3:
            this.hd_1 = 4;
            var tmp_3 = this.ppu_1.don_1.a7g();
            var this_2 = this.opu_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.mpv_1;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver_1);
              }
            }

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

            continue $sm;
          case 4:
            var tmp_4 = this;
            var this_3 = this.opu_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.npv_1;
              var list = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
              addAll(destination_1, list);
            }

            tmp_4.vpu_1 = destination_1;
            var tmp_5 = this;
            var this_4 = this.vpu_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.qpv_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.jj5_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.wpu_1 = tmp_7;
            if (this.wpu_1 == null) {
              this.xpu_1 = null;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_8 = this;
              tmp_8.ypu_1 = this.wpu_1;
              var tmp_9 = this;
              tmp_9.zpu_1 = this.ypu_1;
              this.hd_1 = 5;
              suspendResult = insertOrUpdateActorsIfNameChanged(this.ppu_1.don_1.k7e(), this.zpu_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 5:
            this.xpu_1 = this.ypu_1;
            this.hd_1 = 6;
            continue $sm;
          case 6:
            var tmp_10 = this;
            var this_5 = this.vpu_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.qpv_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.jj5_1;
              if (tmp_11 === 2) {
                destination_5.i1(element_4);
              }
            }

            tmp_10.apv_1 = destination_5;
            this.hd_1 = 7;
            var tmp_12 = this.ppu_1.yom_1.k7e();
            var this_6 = this.apv_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.zj4_1);
            }

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

            continue $sm;
          case 7:
            this.bpv_1 = suspendResult;
            var tmp_13 = this;
            var this_7 = this.vpu_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.rpv_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.zj4_1, element_6);
            }

            tmp_13.cpv_1 = destination_8;
            var tmp_14 = this;
            tmp_14.dpv_1 = this.apv_1;
            this.epv_1 = this.dpv_1.w();
            this.hd_1 = 8;
            continue $sm;
          case 8:
            if (!this.epv_1.f()) {
              this.hd_1 = 14;
              continue $sm;
            }

            this.fpv_1 = this.epv_1.e();
            var tmp_15 = this;
            tmp_15.gpv_1 = this.fpv_1;
            var tmp_16 = this;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp0_iterator_10 = this.bpv_1.w();
              while (tmp0_iterator_10.f()) {
                var element_7 = tmp0_iterator_10.e();
                if (element_7.bj6_1.equals(this.gpv_1.zj4_1)) {
                  tmp$ret$2 = element_7;
                  break l$ret$3;
                }
              }
              tmp$ret$2 = null;
            }
             while (false);
            tmp_16.hpv_1 = tmp$ret$2;
            var tmp_17 = this;
            var tmp_18;
            if (!isAnonymous(this.gpv_1)) {
              var tmp_19 = this.gpv_1.hj5_1;
              var tmp0_safe_receiver_2 = this.hpv_1;
              tmp_18 = !tmp_19.equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.cj6_1);
            } else {
              tmp_18 = true;
            }

            tmp_17.ipv_1 = tmp_18;
            var tmp_20 = this;
            var this_8 = this.vpu_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.spv_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.wj9_1.equals(this.gpv_1.zj4_1)) {
                destination_10.i1(element_9);
              }
            }

            tmp_20.jpv_1 = destination_10;
            var tmp_21 = this;
            var this_9 = this.jpv_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.cpv_1.q(element_10.xj9_1);
              if (tmp0_safe_receiver_3 == null)
                null;
              else {
                destination_11.i1(tmp0_safe_receiver_3);
              }
            }

            tmp_21.kpv_1 = destination_11;
            this.hd_1 = 9;
            suspendResult = insertOrUpdateActorsIfNameChanged(this.ppu_1.don_1.k7e(), this.kpv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            if (!this.ipv_1 ? !(this.hpv_1 == null) : false) {
              this.hd_1 = 12;
              var tmp_22 = this.ppu_1.don_1.u7f();
              var this_10 = this.jpv_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.jl2(VOID, VOID, this.hpv_1.dj6_1));
              }
              suspendResult = insertOrUpdateIfLastModChanged(tmp_22, destination_12, this.hpv_1.dj6_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 10;
              suspendResult = this.ppu_1.don_1.k7e().dj4(listOf_0(this.gpv_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 10:
            this.hd_1 = 11;
            suspendResult = this.ppu_1.don_1.u7f().sj9(this.jpv_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.ppu_1.don_1.g7e();
            var this_11 = this.opu_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.opv_1;
              var tmp0_safe_receiver_5 = tmp0_safe_receiver_4 == null ? null : tmp0_safe_receiver_4.tpv_1;
              if (tmp0_safe_receiver_5 == null)
                null;
              else {
                destination_13.i1(tmp0_safe_receiver_5);
              }
            }

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

            continue $sm;
          case 15:
            this.hd_1 = 16;
            var tmp_24 = this.ppu_1.don_1.t7f();
            var this_12 = this.opu_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.opv_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver_6 == null ? null : tmp0_safe_receiver_6.upv_1;
              var list_2 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
              addAll(destination_14, list_2);
            }

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

            continue $sm;
          case 16:
            this.hd_1 = 17;
            var this_13 = this.opu_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.ppv_1;
              var list_3 = tmp0_elvis_lhs_0 == null ? emptyList() : tmp0_elvis_lhs_0;
              addAll(destination_15, list_3);
            }

            suspendResult = this.ppu_1.con_1.opt(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).jo1 = function (it, completion) {
    var i = new XapiStatementResource$storeStatements$slambda(this.opu_1, this.ppu_1, this.qpu_1, completion);
    i.rpu_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $storeStatementsCOROUTINE$43(_this__u8e3s4, statements, xapiSession, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.apu_1 = _this__u8e3s4;
    this.bpu_1 = statements;
    this.cpu_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.dpu_1 = identifierHash(agent(this.cpu_1, this.apu_1.aon_1), this.apu_1.zom_1);
            var tmp_0 = this;
            var it = knownActorUidToPersonUidsMap(this.cpu_1, this.apu_1.eon_1);
            var tmp_1;
            if (!it.r(this.dpu_1)) {
              tmp_1 = plus_3(it, to(this.dpu_1, this.cpu_1.sk0_1));
            } else {
              tmp_1 = it;
            }

            tmp_0.epu_1 = tmp_1;
            var tmp_2 = this;
            var this_0 = this.bpu_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.fmf().toString();
              var tmp1_elvis_lhs = element.bpw_1;
              var tmp4_timestamp = tmp1_elvis_lhs == null ? timeNowStr : tmp1_elvis_lhs;
              var tmp0_elvis_lhs = xapiRequireValidUuidOrNullAsString(element.vpv_1);
              var tmp5_id = tmp0_elvis_lhs == null ? randomUuidAsString() : tmp0_elvis_lhs;
              var tmp2_name = this.cpu_1.uk0_1;
              var tmp3_homePage = this.apu_1.aon_1.xnv_1;
              var tmp6_authority = new XapiAgent(VOID, VOID, VOID, VOID, VOID, new XapiAccount(tmp3_homePage, tmp2_name));
              var exactStatement = element.hpw(tmp5_id, VOID, VOID, VOID, VOID, VOID, tmp4_timestamp, timeNowStr, tmp6_authority);
              var tmp7_stringHasher = this.apu_1.zom_1;
              var tmp8_exactJson = this.apu_1.eon_1.r45(Companion_getInstance_91().n4r(), exactStatement);
              var tmp9_primaryKeyManager = get_doorPrimaryKeyManager(this.apu_1.yom_1);
              var tmp10_hasherFactory = this.apu_1.bon_1;
              var tmp11_json = this.apu_1.eon_1;
              var tmp12_learningSpace = this.apu_1.aon_1;
              var list = toEntities_3(exactStatement, tmp7_stringHasher, tmp9_primaryKeyManager, tmp10_hasherFactory, tmp11_json, this.cpu_1, this.epu_1, tmp8_exactJson, false, tmp12_learningSpace);
              addAll(destination, list);
            }

            tmp_2.fpu_1 = destination;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.apu_1.don_1, VOID, XapiStatementResource$storeStatements$slambda_0(this.fpu_1, this.apu_1, this.cpu_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_1 = this.fpu_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.lpv_1;
              var tmp_3;
              if (tmp0_safe_receiver == null) {
                tmp_3 = null;
              } else {
                tmp_3 = Uuid_init_$Create$(tmp0_safe_receiver.bjg_1, tmp0_safe_receiver.cjg_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.rpw_1 = _this__u8e3s4;
    this.spw_1 = statements;
    this.tpw_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.rpw_1, this.spw_1, this.tpw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            return ARGUMENT.rpt_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.yom_1 = db;
    this.zom_1 = xxHasher;
    this.aon_1 = learningSpace;
    this.bon_1 = hasherFactory;
    this.con_1 = storeActivitiesUseCase;
    var tmp = this;
    tmp.don_1 = repo == null ? this.yom_1 : repo;
    this.eon_1 = xapiJson.qpt_1;
  }
  protoOf(XapiStatementResource).fon = 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.soo_1 = group;
    this.too_1 = actorUidToPersonUidMap;
  }
  protoOf(XapiGroupAndPersonUidMap).toString = function () {
    return 'XapiGroupAndPersonUidMap(group=' + this.soo_1 + ', actorUidToPersonUidMap=' + this.too_1 + ')';
  };
  protoOf(XapiGroupAndPersonUidMap).hashCode = function () {
    var result = this.soo_1.hashCode();
    result = imul(result, 31) + hashCode(this.too_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.soo_1.equals(tmp0_other_with_cast.soo_1))
      return false;
    if (!equals(this.too_1, tmp0_other_with_cast.too_1))
      return false;
    return true;
  };
  function $invokeCOROUTINE$47(_this__u8e3s4, groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.cpx_1 = _this__u8e3s4;
    this.dpx_1 = groupSetUid;
    this.epx_1 = groupNum;
    this.fpx_1 = clazzUid;
    this.gpx_1 = assignmentUid;
    this.hpx_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.cpx_1.ooo_1.s7d().vd3(this.dpx_1, this.epx_1, this.fpx_1, this.gpx_1, this.hpx_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.cpx_1.poo_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.cpx_1.poo_1.xnv_1, 'cgs-' + this.dpx_1.toString() + '-' + this.epx_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.cpx_1.qoo_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.ooo_1 = repo;
    this.poo_1 = learningSpace;
    this.qoo_1 = stringHasher;
  }
  protoOf(CreateXapiGroupForCourseGroupUseCase).roo = 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.qpx_1 = _this__u8e3s4;
    this.rpx_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.qpx_1.cj4(this.rpx_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.spx_1 = systemTimeInMillis();
            var tmp_0 = this;
            tmp_0.tpx_1 = this.rpx_1;
            this.upx_1 = this.tpx_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.upx_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.vpx_1 = this.upx_1.e();
            var tmp_1 = this;
            tmp_1.wpx_1 = this.vpx_1;
            this.hd_1 = 3;
            suspendResult = this.qpx_1.ej4(this.wpx_1.zj4_1, this.wpx_1.bj5_1, this.spx_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.fpy_1 = _this__u8e3s4;
    this.gpy_1 = memberJoins;
    this.hpy_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.fpy_1.rj9(this.gpy_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.ipy_1 = this.gpy_1;
            this.jpy_1 = this.ipy_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.jpy_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.kpy_1 = this.jpy_1.e();
            var tmp_1 = this;
            tmp_1.lpy_1 = this.kpy_1;
            this.hd_1 = 3;
            suspendResult = this.fpy_1.tj9(this.lpy_1.wj9_1, this.lpy_1.xj9_1, this.hpy_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.xnv_1, _this__u8e3s4.uk0_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.fk1_1;
    if (charSequenceLength(this_0) > 0) {
      tmp = json.s45(MapSerializer(serializer_1(Companion_getInstance_2()), serializer_1(Companion_getInstance_2())), _this__u8e3s4.fk1_1);
    } else {
      tmp = emptyMap();
    }
    return tmp;
  }
  function authorizationHeader(_this__u8e3s4) {
    return 'Basic ' + encodeBase64(_this__u8e3s4.nk0_1.toString() + ':' + _this__u8e3s4.dk1_1);
  }
  function get_registrationUuid(_this__u8e3s4) {
    return Uuid_init_$Create$(_this__u8e3s4.pk0_1, _this__u8e3s4.qk0_1);
  }
  function get_resultProgressExtension(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.zpv_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rpy_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.spy_1 = string;
    this.tpy_1 = stringResource;
  }
  protoOf(FormattedStatementResponse).upy = function () {
    return !(this.spy_1 == null) ? true : !(this.tpy_1 == null);
  };
  protoOf(FormattedStatementResponse).toString = function () {
    return 'FormattedStatementResponse(string=' + this.spy_1 + ', stringResource=' + this.tpy_1 + ')';
  };
  protoOf(FormattedStatementResponse).hashCode = function () {
    var result = this.spy_1 == null ? 0 : getStringHashCode(this.spy_1);
    result = imul(result, 31) + (this.tpy_1 == null ? 0 : this.tpy_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.spy_1 == tmp0_other_with_cast.spy_1))
      return false;
    if (!equals(this.tpy_1, tmp0_other_with_cast.tpy_1))
      return false;
    return true;
  };
  function Companion_59() {
    Companion_instance_108 = this;
    var tmp = this;
    tmp.vpy_1 = listOf([2, 7, 8, 5, 6]);
  }
  var Companion_instance_108;
  function Companion_getInstance_76() {
    if (Companion_instance_108 == null)
      new Companion_59();
    return Companion_instance_108;
  }
  function FormatStatementResponseUseCase$invoke$slambda($activityEntity, $statement, this$0, resultContinuation) {
    this.epz_1 = $activityEntity;
    this.fpz_1 = $statement;
    this.gpz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(FormatStatementResponseUseCase$invoke$slambda).spz = function ($this$flow, $completion) {
    var tmp = this.tpz($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.spz((!(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.epz_1;
            tmp_0.ipz_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dir_1;
            this.jpz_1 = this.fpz_1.sjg_1;
            var tmp_1;
            if (this.jpz_1 == null ? true : this.ipz_1 == null) {
              tmp_1 = true;
            } else {
              tmp_1 = this.ipz_1 === 0;
            }

            if (tmp_1) {
              this.hd_1 = 10;
              var tmp1_safe_receiver = this.jpz_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.hpz_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.kpz_1 = this.ipz_1;
            if (Companion_getInstance_76().vpy_1.a1(this.kpz_1)) {
              var tmp_3 = this;
              tmp_3.lpz_1 = listOfNotNull([this.gpz_1.upz_1, this.gpz_1.vpz_1]);
              this.mpz_1 = this.lpz_1.w();
              this.hd_1 = 5;
              continue $sm;
            } else {
              if (this.kpz_1 === 1) {
                this.npz_1 = toBooleanStrictOrNull(this.jpz_1);
                this.hd_1 = 4;
                var tmp_4;
                if (this.npz_1 === true) {
                  tmp_4 = strings_getInstance().gns_1;
                } else if (this.npz_1 === false) {
                  tmp_4 = strings_getInstance().hns_1;
                } else {
                  tmp_4 = null;
                }
                suspendResult = this.hpz_1.t1d(new FormattedStatementResponse(null, tmp_4), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_5;
                if (this.kpz_1 === 3) {
                  tmp_5 = true;
                } else {
                  tmp_5 = this.kpz_1 === 4;
                }
                if (tmp_5) {
                  this.hd_1 = 3;
                  var this_0 = htmlToPlainText(replace(this.jpz_1, '[,]', ', '));
                  suspendResult = this.hpz_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.jpz_1);
                  suspendResult = this.hpz_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.mpz_1.f()) {
              this.hd_1 = 8;
              continue $sm;
            }

            this.opz_1 = this.mpz_1.e();
            var tmp_6 = this;
            tmp_6.ppz_1 = this.opz_1;
            this.hd_1 = 6;
            suspendResult = this.ppz_1.v7f().kiy(this.fpz_1.gjg_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.qpz_1 = suspendResult;
            var tmp_7 = this;
            var tmp0_subject = this.ipz_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.ipz_1 === 8) {
                tmp_11 = 'scale';
              } else {
                tmp_11 = 'choices';
              }
              var propPrefix = tmp_11;
              var responseIds = split(this.jpz_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.qpz_1.w();
                  while (tmp0_iterator_0.f()) {
                    var element = tmp0_iterator_0.e();
                    if (element.qiy_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.riy_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.jpz_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.qpz_1.w();
                    while (tmp0_iterator_2.f()) {
                      var element_0 = tmp0_iterator_2.e();
                      if (element_0.qiy_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.riy_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.qpz_1.w();
                    while (tmp0_iterator_3.f()) {
                      var element_1 = tmp0_iterator_3.e();
                      if (element_1.qiy_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.riy_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.jpz_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.qpz_1.w();
                      while (tmp0_iterator_5.f()) {
                        var element_2 = tmp0_iterator_5.e();
                        if (element_2.qiy_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.riy_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.rpz_1 = tmp_8;
            this.hd_1 = 7;
            var tmp1_elvis_lhs_2 = this.rpz_1;
            var this_4 = htmlToPlainText(tmp1_elvis_lhs_2 == null ? this.jpz_1 : tmp1_elvis_lhs_2);
            suspendResult = this.hpz_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).tpz = function ($this$flow, completion) {
    var i = new FormatStatementResponseUseCase$invoke$slambda(this.epz_1, this.fpz_1, this.gpz_1, completion);
    i.hpz_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.spz($this$flow, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function FormatStatementResponseUseCase(db, repo) {
    Companion_getInstance_76();
    this.upz_1 = db;
    this.vpz_1 = repo;
  }
  protoOf(FormatStatementResponseUseCase).wpz = function (statement, activityEntity) {
    return flow(FormatStatementResponseUseCase$invoke$slambda_0(activityEntity, statement, this, null));
  };
  function Companion_60() {
    Companion_instance_109 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.xpz_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), null, null, null];
  }
  var Companion_instance_109;
  function Companion_getInstance_77() {
    if (Companion_instance_109 == null)
      new Companion_60();
    return Companion_instance_109;
  }
  function $serializer_45() {
    $serializer_instance_45 = 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.ypz_1 = tmp0_serialDesc;
  }
  protoOf($serializer_45).q44 = function () {
    return this.ypz_1;
  };
  protoOf($serializer_45).k4g = function () {
    var tmp0_cached = Companion_getInstance_77().xpz_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_45).s44 = function (decoder) {
    var tmp0_desc = this.ypz_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_77().xpz_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_45).zpz = function (encoder, value) {
    var tmp0_desc = this.ypz_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_77().xpz_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.aq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.aq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.bq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.bq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.cq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, tmp2_cached[2], value.cq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.dq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.dq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !value.eq0_1.equals(new Long(0, 0))) {
      tmp1_output.s49(tmp0_desc, 4, value.eq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.fq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, StringSerializer_getInstance(), value.fq0_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_45).r44 = function (encoder, value) {
    return this.zpz(encoder, value instanceof Attachment ? value : THROW_CCE());
  };
  var $serializer_instance_45;
  function $serializer_getInstance_57() {
    if ($serializer_instance_45 == null)
      new $serializer_45();
    return $serializer_instance_45;
  }
  function Attachment_init_$Init$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_57().ypz_1);
    }
    if (0 === (seen1 & 1))
      $this.aq0_1 = null;
    else
      $this.aq0_1 = usageType;
    if (0 === (seen1 & 2))
      $this.bq0_1 = null;
    else
      $this.bq0_1 = display;
    if (0 === (seen1 & 4))
      $this.cq0_1 = null;
    else
      $this.cq0_1 = description;
    if (0 === (seen1 & 8))
      $this.dq0_1 = null;
    else
      $this.dq0_1 = contentType;
    if (0 === (seen1 & 16))
      $this.eq0_1 = new Long(0, 0);
    else
      $this.eq0_1 = length;
    if (0 === (seen1 & 32))
      $this.fq0_1 = null;
    else
      $this.fq0_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_77();
    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.aq0_1 = usageType;
    this.bq0_1 = display;
    this.cq0_1 = description;
    this.dq0_1 = contentType;
    this.eq0_1 = length;
    this.fq0_1 = sha2;
  }
  protoOf(Attachment).toString = function () {
    return 'Attachment(usageType=' + this.aq0_1 + ', display=' + this.bq0_1 + ', description=' + this.cq0_1 + ', contentType=' + this.dq0_1 + ', length=' + this.eq0_1.toString() + ', sha2=' + this.fq0_1 + ')';
  };
  protoOf(Attachment).hashCode = function () {
    var result = this.aq0_1 == null ? 0 : getStringHashCode(this.aq0_1);
    result = imul(result, 31) + (this.bq0_1 == null ? 0 : hashCode(this.bq0_1)) | 0;
    result = imul(result, 31) + (this.cq0_1 == null ? 0 : hashCode(this.cq0_1)) | 0;
    result = imul(result, 31) + (this.dq0_1 == null ? 0 : getStringHashCode(this.dq0_1)) | 0;
    result = imul(result, 31) + this.eq0_1.hashCode() | 0;
    result = imul(result, 31) + (this.fq0_1 == null ? 0 : getStringHashCode(this.fq0_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.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;
    if (!(this.dq0_1 == tmp0_other_with_cast.dq0_1))
      return false;
    if (!this.eq0_1.equals(tmp0_other_with_cast.eq0_1))
      return false;
    if (!(this.fq0_1 == tmp0_other_with_cast.fq0_1))
      return false;
    return true;
  };
  function Companion_61() {
  }
  var Companion_instance_110;
  function Companion_getInstance_78() {
    return Companion_instance_110;
  }
  function $serializer_46() {
    $serializer_instance_46 = 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.gq0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_46).q44 = function () {
    return this.gq0_1;
  };
  protoOf($serializer_46).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_46).s44 = function (decoder) {
    var tmp0_desc = this.gq0_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_46).hq0 = function (encoder, value) {
    var tmp0_desc = this.gq0_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.iq0_1);
    tmp1_output.w49(tmp0_desc, 1, value.jq0_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_46).r44 = function (encoder, value) {
    return this.hq0(encoder, value instanceof XapiAccount ? value : THROW_CCE());
  };
  var $serializer_instance_46;
  function $serializer_getInstance_58() {
    if ($serializer_instance_46 == null)
      new $serializer_46();
    return $serializer_instance_46;
  }
  function XapiAccount_init_$Init$(seen1, homePage, name, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_58().gq0_1);
    }
    $this.iq0_1 = homePage;
    $this.jq0_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.iq0_1 = homePage;
    this.jq0_1 = name;
  }
  protoOf(XapiAccount).toString = function () {
    return 'XapiAccount(homePage=' + this.iq0_1 + ', name=' + this.jq0_1 + ')';
  };
  protoOf(XapiAccount).hashCode = function () {
    var result = getStringHashCode(this.iq0_1);
    result = imul(result, 31) + getStringHashCode(this.jq0_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.iq0_1 === tmp0_other_with_cast.iq0_1))
      return false;
    if (!(this.jq0_1 === tmp0_other_with_cast.jq0_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.kq0_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];
  }
  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('com.ustadmobile.core.domain.xapi.model.XapiActivity.Interaction', this, 2);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('description', true);
    this.lq0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_47).q44 = function () {
    return this.lq0_1;
  };
  protoOf($serializer_47).k4g = function () {
    var tmp0_cached = Companion_getInstance_79().kq0_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_47).s44 = function (decoder) {
    var tmp0_desc = this.lq0_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_79().kq0_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_47).mq0 = function (encoder, value) {
    var tmp0_desc = this.lq0_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_79().kq0_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.nq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.nq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.oq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.oq0_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_47).r44 = function (encoder, value) {
    return this.mq0(encoder, value instanceof Interaction ? value : THROW_CCE());
  };
  var $serializer_instance_47;
  function $serializer_getInstance_59() {
    if ($serializer_instance_47 == null)
      new $serializer_47();
    return $serializer_instance_47;
  }
  function Interaction_init_$Init$(seen1, id, description, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_59().lq0_1);
    }
    if (0 === (seen1 & 1))
      $this.nq0_1 = null;
    else
      $this.nq0_1 = id;
    if (0 === (seen1 & 2))
      $this.oq0_1 = null;
    else
      $this.oq0_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_79();
    id = id === VOID ? null : id;
    description = description === VOID ? null : description;
    this.nq0_1 = id;
    this.oq0_1 = description;
  }
  protoOf(Interaction).toString = function () {
    return 'Interaction(id=' + this.nq0_1 + ', description=' + this.oq0_1 + ')';
  };
  protoOf(Interaction).hashCode = function () {
    var result = this.nq0_1 == null ? 0 : getStringHashCode(this.nq0_1);
    result = imul(result, 31) + (this.oq0_1 == null ? 0 : hashCode(this.oq0_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.nq0_1 == tmp0_other_with_cast.nq0_1))
      return false;
    if (!equals(this.oq0_1, tmp0_other_with_cast.oq0_1))
      return false;
    return true;
  };
  function Companion_63() {
    Companion_instance_112 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.pq0_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_59()), new ArrayListSerializer($serializer_getInstance_59()), new ArrayListSerializer($serializer_getInstance_59()), new ArrayListSerializer($serializer_getInstance_59()), new ArrayListSerializer($serializer_getInstance_59())];
  }
  var Companion_instance_112;
  function Companion_getInstance_80() {
    if (Companion_instance_112 == null)
      new Companion_63();
    return Companion_instance_112;
  }
  function $serializer_48() {
    $serializer_instance_48 = 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.qq0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_48).q44 = function () {
    return this.qq0_1;
  };
  protoOf($serializer_48).k4g = function () {
    var tmp0_cached = Companion_getInstance_80().pq0_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_48).s44 = function (decoder) {
    var tmp0_desc = this.qq0_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_80().pq0_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_48).rq0 = function (encoder, value) {
    var tmp0_desc = this.qq0_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_80().pq0_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.sq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, tmp2_cached[0], value.sq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.tq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.tq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.uq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.uq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.vq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, tmp2_cached[3], value.vq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.wq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.wq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.xq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, value.xq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.yq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, tmp2_cached[6], value.yq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.zq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 7, tmp2_cached[7], value.zq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.aq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 8, tmp2_cached[8], value.aq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 9) ? true : !(value.bq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 9, tmp2_cached[9], value.bq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 10) ? true : !(value.cq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 10, tmp2_cached[10], value.cq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 11) ? true : !(value.dq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 11, tmp2_cached[11], value.dq1_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_48).r44 = function (encoder, value) {
    return this.rq0(encoder, value instanceof XapiActivity ? value : THROW_CCE());
  };
  var $serializer_instance_48;
  function $serializer_getInstance_60() {
    if ($serializer_instance_48 == null)
      new $serializer_48();
    return $serializer_instance_48;
  }
  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_60().qq0_1);
    }
    if (0 === (seen1 & 1))
      $this.sq0_1 = null;
    else
      $this.sq0_1 = name;
    if (0 === (seen1 & 2))
      $this.tq0_1 = null;
    else
      $this.tq0_1 = description;
    if (0 === (seen1 & 4))
      $this.uq0_1 = null;
    else
      $this.uq0_1 = type;
    if (0 === (seen1 & 8))
      $this.vq0_1 = null;
    else
      $this.vq0_1 = extensions;
    if (0 === (seen1 & 16))
      $this.wq0_1 = null;
    else
      $this.wq0_1 = moreInfo;
    if (0 === (seen1 & 32))
      $this.xq0_1 = null;
    else
      $this.xq0_1 = interactionType;
    if (0 === (seen1 & 64))
      $this.yq0_1 = null;
    else
      $this.yq0_1 = correctResponsePattern;
    if (0 === (seen1 & 128))
      $this.zq0_1 = null;
    else
      $this.zq0_1 = choices;
    if (0 === (seen1 & 256))
      $this.aq1_1 = null;
    else
      $this.aq1_1 = scale;
    if (0 === (seen1 & 512))
      $this.bq1_1 = null;
    else
      $this.bq1_1 = source;
    if (0 === (seen1 & 1024))
      $this.cq1_1 = null;
    else
      $this.cq1_1 = target;
    if (0 === (seen1 & 2048))
      $this.dq1_1 = null;
    else
      $this.dq1_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_80();
    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.sq0_1 = name;
    this.tq0_1 = description;
    this.uq0_1 = type;
    this.vq0_1 = extensions;
    this.wq0_1 = moreInfo;
    this.xq0_1 = interactionType;
    this.yq0_1 = correctResponsePattern;
    this.zq0_1 = choices;
    this.aq1_1 = scale;
    this.bq1_1 = source;
    this.cq1_1 = target;
    this.dq1_1 = steps;
  }
  protoOf(XapiActivity).toString = function () {
    return 'XapiActivity(name=' + this.sq0_1 + ', description=' + this.tq0_1 + ', type=' + this.uq0_1 + ', extensions=' + this.vq0_1 + ', moreInfo=' + this.wq0_1 + ', interactionType=' + this.xq0_1 + ', correctResponsePattern=' + this.yq0_1 + ', choices=' + this.zq0_1 + ', scale=' + this.aq1_1 + ', source=' + this.bq1_1 + ', target=' + this.cq1_1 + ', steps=' + this.dq1_1 + ')';
  };
  protoOf(XapiActivity).hashCode = function () {
    var result = this.sq0_1 == null ? 0 : hashCode(this.sq0_1);
    result = imul(result, 31) + (this.tq0_1 == null ? 0 : hashCode(this.tq0_1)) | 0;
    result = imul(result, 31) + (this.uq0_1 == null ? 0 : getStringHashCode(this.uq0_1)) | 0;
    result = imul(result, 31) + (this.vq0_1 == null ? 0 : hashCode(this.vq0_1)) | 0;
    result = imul(result, 31) + (this.wq0_1 == null ? 0 : getStringHashCode(this.wq0_1)) | 0;
    result = imul(result, 31) + (this.xq0_1 == null ? 0 : this.xq0_1.hashCode()) | 0;
    result = imul(result, 31) + (this.yq0_1 == null ? 0 : hashCode(this.yq0_1)) | 0;
    result = imul(result, 31) + (this.zq0_1 == null ? 0 : hashCode(this.zq0_1)) | 0;
    result = imul(result, 31) + (this.aq1_1 == null ? 0 : hashCode(this.aq1_1)) | 0;
    result = imul(result, 31) + (this.bq1_1 == null ? 0 : hashCode(this.bq1_1)) | 0;
    result = imul(result, 31) + (this.cq1_1 == null ? 0 : hashCode(this.cq1_1)) | 0;
    result = imul(result, 31) + (this.dq1_1 == null ? 0 : hashCode(this.dq1_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.sq0_1, tmp0_other_with_cast.sq0_1))
      return false;
    if (!equals(this.tq0_1, tmp0_other_with_cast.tq0_1))
      return false;
    if (!(this.uq0_1 == tmp0_other_with_cast.uq0_1))
      return false;
    if (!equals(this.vq0_1, tmp0_other_with_cast.vq0_1))
      return false;
    if (!(this.wq0_1 == tmp0_other_with_cast.wq0_1))
      return false;
    if (!equals(this.xq0_1, tmp0_other_with_cast.xq0_1))
      return false;
    if (!equals(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;
    if (!equals(this.cq1_1, tmp0_other_with_cast.cq1_1))
      return false;
    if (!equals(this.dq1_1, tmp0_other_with_cast.dq1_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.wps_1 = activityEntity;
    this.xps_1 = activityLangMapEntries;
    this.yps_1 = activityInteractionEntities;
    this.zps_1 = activityExtensionEntities;
    this.apt_1 = statementContextActivityJoin;
  }
  protoOf(ActivityEntities).eq1 = function (activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) {
    return new ActivityEntities(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin);
  };
  protoOf(ActivityEntities).fq1 = function (activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin, $super) {
    activityEntity = activityEntity === VOID ? this.wps_1 : activityEntity;
    activityLangMapEntries = activityLangMapEntries === VOID ? this.xps_1 : activityLangMapEntries;
    activityInteractionEntities = activityInteractionEntities === VOID ? this.yps_1 : activityInteractionEntities;
    activityExtensionEntities = activityExtensionEntities === VOID ? this.zps_1 : activityExtensionEntities;
    statementContextActivityJoin = statementContextActivityJoin === VOID ? this.apt_1 : statementContextActivityJoin;
    return $super === VOID ? this.eq1(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) : $super.eq1.call(this, activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin);
  };
  protoOf(ActivityEntities).toString = function () {
    return 'ActivityEntities(activityEntity=' + this.wps_1 + ', activityLangMapEntries=' + this.xps_1 + ', activityInteractionEntities=' + this.yps_1 + ', activityExtensionEntities=' + this.zps_1 + ', statementContextActivityJoin=' + this.apt_1 + ')';
  };
  protoOf(ActivityEntities).hashCode = function () {
    var result = this.wps_1.hashCode();
    result = imul(result, 31) + hashCode(this.xps_1) | 0;
    result = imul(result, 31) + hashCode(this.yps_1) | 0;
    result = imul(result, 31) + hashCode(this.zps_1) | 0;
    result = imul(result, 31) + (this.apt_1 == null ? 0 : this.apt_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.wps_1.equals(tmp0_other_with_cast.wps_1))
      return false;
    if (!equals(this.xps_1, tmp0_other_with_cast.xps_1))
      return false;
    if (!equals(this.yps_1, tmp0_other_with_cast.yps_1))
      return false;
    if (!equals(this.zps_1, tmp0_other_with_cast.zps_1))
      return false;
    if (!equals(this.apt_1, tmp0_other_with_cast.apt_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.om8(activityId);
    var tmp9_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.zq0_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.aq1_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.bq1_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.cq1_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.dq1_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.uq0_1;
    var tmp_9 = _this__u8e3s4 == null ? null : _this__u8e3s4.wq0_1;
    var tmp13_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.xq0_1;
    var tmp14_elvis_lhs = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.jq1_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.yq0_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.sq0_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.tq0_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.vq0_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.om8(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.om8(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.om8('' + propId + _this__u8e3s4.nq0_1);
    var tmp = new ActivityInteractionEntity(activityUid, aieHash, propId, _this__u8e3s4.nq0_1);
    var tmp0_safe_receiver = _this__u8e3s4.oq0_1;
    return to(tmp, toEmptyIfNull(tmp0_safe_receiver == null ? null : toEntities$toLangMapEntries(tmp0_safe_receiver, activityUid, $stringHasher, propName + '-' + _this__u8e3s4.nq0_1, aieHash)));
  }
  function Companion_64() {
  }
  protoOf(Companion_64).n4r = function () {
    return XapiActorSerializer_getInstance();
  };
  protoOf(Companion_64).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_113;
  function Companion_getInstance_81() {
    return Companion_instance_113;
  }
  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_114.n4r();
        break;
      case 4:
        tmp_0 = Companion_getInstance_86().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.nq1() == null)) {
      var tmp0_safe_receiver = _this__u8e3s4.nq1();
      var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.jq0_1;
      var tmp1_safe_receiver = _this__u8e3s4.nq1();
      tmp = '' + tmp_0 + '@' + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.iq0_1);
    } else if (!(_this__u8e3s4.kq1() == null)) {
      tmp = _this__u8e3s4.kq1();
    } else if (!(_this__u8e3s4.lq1() == null)) {
      tmp = _this__u8e3s4.lq1();
    } else if (!(_this__u8e3s4.mq1() == null)) {
      tmp = _this__u8e3s4.mq1();
    } 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.om8(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.qpv_1 = actor;
    this.rpv_1 = groupMemberAgents;
    this.spv_1 = groupMemberJoins;
  }
  protoOf(ActorEntities).toString = function () {
    return 'ActorEntities(actor=' + this.qpv_1 + ', groupMemberAgents=' + this.rpv_1 + ', groupMemberJoins=' + this.spv_1 + ')';
  };
  protoOf(ActorEntities).hashCode = function () {
    var result = this.qpv_1.hashCode();
    result = imul(result, 31) + hashCode(this.rpv_1) | 0;
    result = imul(result, 31) + hashCode(this.spv_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.qpv_1.equals(tmp0_other_with_cast.qpv_1))
      return false;
    if (!equals(this.rpv_1, tmp0_other_with_cast.rpv_1))
      return false;
    if (!equals(this.spv_1, tmp0_other_with_cast.spv_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_65() {
  }
  protoOf(Companion_65).n4r = function () {
    return $serializer_getInstance_61();
  };
  var Companion_instance_114;
  function Companion_getInstance_82() {
    return Companion_instance_114;
  }
  function $serializer_49() {
    $serializer_instance_49 = 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.rq1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_49).q44 = function () {
    return this.rq1_1;
  };
  protoOf($serializer_49).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_58())];
  };
  protoOf($serializer_49).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_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_58(), 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_58(), 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_49).sq1 = function (encoder, value) {
    var tmp0_desc = this.rq1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.tq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.tq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.uq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.uq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.vq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.vq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.wq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.wq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.xq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, XapiObjectTypeSerializer_instance, value.xq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.yq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, $serializer_getInstance_58(), value.yq1_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_49).r44 = function (encoder, value) {
    return this.sq1(encoder, value instanceof XapiAgent ? value : THROW_CCE());
  };
  var $serializer_instance_49;
  function $serializer_getInstance_61() {
    if ($serializer_instance_49 == null)
      new $serializer_49();
    return $serializer_instance_49;
  }
  function XapiAgent_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_61().rq1_1);
    }
    if (0 === (seen1 & 1))
      $this.tq1_1 = null;
    else
      $this.tq1_1 = name;
    if (0 === (seen1 & 2))
      $this.uq1_1 = null;
    else
      $this.uq1_1 = mbox;
    if (0 === (seen1 & 4))
      $this.vq1_1 = null;
    else
      $this.vq1_1 = mbox_sha1sum;
    if (0 === (seen1 & 8))
      $this.wq1_1 = null;
    else
      $this.wq1_1 = openid;
    if (0 === (seen1 & 16))
      $this.xq1_1 = null;
    else
      $this.xq1_1 = objectType;
    if (0 === (seen1 & 32))
      $this.yq1_1 = null;
    else
      $this.yq1_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.tq1_1 = name;
    this.uq1_1 = mbox;
    this.vq1_1 = mbox_sha1sum;
    this.wq1_1 = openid;
    this.xq1_1 = objectType;
    this.yq1_1 = account;
  }
  protoOf(XapiAgent).kq1 = function () {
    return this.uq1_1;
  };
  protoOf(XapiAgent).lq1 = function () {
    return this.vq1_1;
  };
  protoOf(XapiAgent).mq1 = function () {
    return this.wq1_1;
  };
  protoOf(XapiAgent).zq1 = function () {
    return this.xq1_1;
  };
  protoOf(XapiAgent).nq1 = function () {
    return this.yq1_1;
  };
  protoOf(XapiAgent).toString = function () {
    return 'XapiAgent(name=' + this.tq1_1 + ', mbox=' + this.uq1_1 + ', mbox_sha1sum=' + this.vq1_1 + ', openid=' + this.wq1_1 + ', objectType=' + this.xq1_1 + ', account=' + this.yq1_1 + ')';
  };
  protoOf(XapiAgent).hashCode = function () {
    var result = this.tq1_1 == null ? 0 : getStringHashCode(this.tq1_1);
    result = imul(result, 31) + (this.uq1_1 == null ? 0 : getStringHashCode(this.uq1_1)) | 0;
    result = imul(result, 31) + (this.vq1_1 == null ? 0 : getStringHashCode(this.vq1_1)) | 0;
    result = imul(result, 31) + (this.wq1_1 == null ? 0 : getStringHashCode(this.wq1_1)) | 0;
    result = imul(result, 31) + (this.xq1_1 == null ? 0 : this.xq1_1.hashCode()) | 0;
    result = imul(result, 31) + (this.yq1_1 == null ? 0 : this.yq1_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.tq1_1 == tmp0_other_with_cast.tq1_1))
      return false;
    if (!(this.uq1_1 == tmp0_other_with_cast.uq1_1))
      return false;
    if (!(this.vq1_1 == tmp0_other_with_cast.vq1_1))
      return false;
    if (!(this.wq1_1 == tmp0_other_with_cast.wq1_1))
      return false;
    if (!equals(this.xq1_1, tmp0_other_with_cast.xq1_1))
      return false;
    if (!equals(this.yq1_1, tmp0_other_with_cast.yq1_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.uq1_1;
    var tmp7_actorMbox_sha1sum = _this__u8e3s4.vq1_1;
    var tmp8_actorOpenid = _this__u8e3s4.wq1_1;
    var tmp1_safe_receiver = _this__u8e3s4.yq1_1;
    var tmp9_actorAccountName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.jq0_1;
    var tmp2_safe_receiver = _this__u8e3s4.yq1_1;
    var tmp10_actorAccountHomePage = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.iq0_1;
    var tmp3_safe_receiver = _this__u8e3s4.tq1_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.om8(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_66() {
    Companion_instance_115 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.aq2_1 = [null, null, null, null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];
  }
  var Companion_instance_115;
  function Companion_getInstance_83() {
    if (Companion_instance_115 == null)
      new Companion_66();
    return Companion_instance_115;
  }
  function $serializer_50() {
    $serializer_instance_50 = 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.bq2_1 = tmp0_serialDesc;
  }
  protoOf($serializer_50).q44 = function () {
    return this.bq2_1;
  };
  protoOf($serializer_50).k4g = function () {
    var tmp0_cached = Companion_getInstance_83().aq2_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_68()), get_nullable(XapiContextActivitiesSerializer_getInstance()), get_nullable(tmp0_cached[8])];
  };
  protoOf($serializer_50).s44 = function (decoder) {
    var tmp0_desc = this.bq2_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_83().aq2_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_68(), 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_68(), 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_50).cq2 = function (encoder, value) {
    var tmp0_desc = this.bq2_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_83().aq2_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.dq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, XapiActorSerializer_getInstance(), value.dq2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.eq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.eq2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.fq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.fq2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.gq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.gq2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.hq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.hq2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.iq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, XapiActorSerializer_getInstance(), value.iq2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.jq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, $serializer_getInstance_68(), value.jq2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.kq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), value.kq2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.lq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 8, tmp2_cached[8], value.lq2_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_50).r44 = function (encoder, value) {
    return this.cq2(encoder, value instanceof XapiContext ? value : THROW_CCE());
  };
  var $serializer_instance_50;
  function $serializer_getInstance_62() {
    if ($serializer_instance_50 == null)
      new $serializer_50();
    return $serializer_instance_50;
  }
  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_62().bq2_1);
    }
    if (0 === (seen1 & 1))
      $this.dq2_1 = null;
    else
      $this.dq2_1 = instructor;
    if (0 === (seen1 & 2))
      $this.eq2_1 = null;
    else
      $this.eq2_1 = registration;
    if (0 === (seen1 & 4))
      $this.fq2_1 = null;
    else
      $this.fq2_1 = language;
    if (0 === (seen1 & 8))
      $this.gq2_1 = null;
    else
      $this.gq2_1 = platform;
    if (0 === (seen1 & 16))
      $this.hq2_1 = null;
    else
      $this.hq2_1 = revision;
    if (0 === (seen1 & 32))
      $this.iq2_1 = null;
    else
      $this.iq2_1 = team;
    if (0 === (seen1 & 64))
      $this.jq2_1 = null;
    else
      $this.jq2_1 = statement;
    if (0 === (seen1 & 128))
      $this.kq2_1 = null;
    else
      $this.kq2_1 = contextActivities;
    if (0 === (seen1 & 256))
      $this.lq2_1 = null;
    else
      $this.lq2_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_83();
    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.dq2_1 = instructor;
    this.eq2_1 = registration;
    this.fq2_1 = language;
    this.gq2_1 = platform;
    this.hq2_1 = revision;
    this.iq2_1 = team;
    this.jq2_1 = statement;
    this.kq2_1 = contextActivities;
    this.lq2_1 = extensions;
  }
  protoOf(XapiContext).toString = function () {
    return 'XapiContext(instructor=' + this.dq2_1 + ', registration=' + this.eq2_1 + ', language=' + this.fq2_1 + ', platform=' + this.gq2_1 + ', revision=' + this.hq2_1 + ', team=' + this.iq2_1 + ', statement=' + this.jq2_1 + ', contextActivities=' + this.kq2_1 + ', extensions=' + this.lq2_1 + ')';
  };
  protoOf(XapiContext).hashCode = function () {
    var result = this.dq2_1 == null ? 0 : hashCode(this.dq2_1);
    result = imul(result, 31) + (this.eq2_1 == null ? 0 : getStringHashCode(this.eq2_1)) | 0;
    result = imul(result, 31) + (this.fq2_1 == null ? 0 : getStringHashCode(this.fq2_1)) | 0;
    result = imul(result, 31) + (this.gq2_1 == null ? 0 : getStringHashCode(this.gq2_1)) | 0;
    result = imul(result, 31) + (this.hq2_1 == null ? 0 : getStringHashCode(this.hq2_1)) | 0;
    result = imul(result, 31) + (this.iq2_1 == null ? 0 : hashCode(this.iq2_1)) | 0;
    result = imul(result, 31) + (this.jq2_1 == null ? 0 : this.jq2_1.hashCode()) | 0;
    result = imul(result, 31) + (this.kq2_1 == null ? 0 : this.kq2_1.hashCode()) | 0;
    result = imul(result, 31) + (this.lq2_1 == null ? 0 : hashCode(this.lq2_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.dq2_1, tmp0_other_with_cast.dq2_1))
      return false;
    if (!(this.eq2_1 == tmp0_other_with_cast.eq2_1))
      return false;
    if (!(this.fq2_1 == tmp0_other_with_cast.fq2_1))
      return false;
    if (!(this.gq2_1 == tmp0_other_with_cast.gq2_1))
      return false;
    if (!(this.hq2_1 == tmp0_other_with_cast.hq2_1))
      return false;
    if (!equals(this.iq2_1, tmp0_other_with_cast.iq2_1))
      return false;
    if (!equals(this.jq2_1, tmp0_other_with_cast.jq2_1))
      return false;
    if (!equals(this.kq2_1, tmp0_other_with_cast.kq2_1))
      return false;
    if (!equals(this.lq2_1, tmp0_other_with_cast.lq2_1))
      return false;
    return true;
  };
  function Companion_67() {
  }
  var Companion_instance_116;
  function Companion_getInstance_84() {
    return Companion_instance_116;
  }
  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.mq2_1 = parent;
    this.nq2_1 = grouping;
    this.oq2_1 = category;
    this.pq2_1 = other;
  }
  protoOf(XapiContextActivities).toString = function () {
    return 'XapiContextActivities(parent=' + this.mq2_1 + ', grouping=' + this.nq2_1 + ', category=' + this.oq2_1 + ', other=' + this.pq2_1 + ')';
  };
  protoOf(XapiContextActivities).hashCode = function () {
    var result = this.mq2_1 == null ? 0 : hashCode(this.mq2_1);
    result = imul(result, 31) + (this.nq2_1 == null ? 0 : hashCode(this.nq2_1)) | 0;
    result = imul(result, 31) + (this.oq2_1 == null ? 0 : hashCode(this.oq2_1)) | 0;
    result = imul(result, 31) + (this.pq2_1 == null ? 0 : hashCode(this.pq2_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.mq2_1, tmp0_other_with_cast.mq2_1))
      return false;
    if (!equals(this.nq2_1, tmp0_other_with_cast.nq2_1))
      return false;
    if (!equals(this.oq2_1, tmp0_other_with_cast.oq2_1))
      return false;
    if (!equals(this.pq2_1, tmp0_other_with_cast.pq2_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_124.n4r(), jsonElement);
    } else {
      tmp = null;
    }
    return tmp;
  }
  function XapiContextActivitiesSerializer() {
    XapiContextActivitiesSerializer_instance = this;
    this.qq2_1 = Companion_getInstance_85().n4r().q44();
  }
  protoOf(XapiContextActivitiesSerializer).q44 = function () {
    return this.qq2_1;
  };
  protoOf(XapiContextActivitiesSerializer).sq2 = function (encoder, value) {
    encoder.z49(Companion_getInstance_85().n4r(), toSurrogate(value));
  };
  protoOf(XapiContextActivitiesSerializer).r44 = function (encoder, value) {
    return this.sq2(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_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.rq2_1 = [new ArrayListSerializer($serializer_getInstance_68()), new ArrayListSerializer($serializer_getInstance_68()), new ArrayListSerializer($serializer_getInstance_68()), new ArrayListSerializer($serializer_getInstance_68())];
  }
  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('XapiContextActivities', this, 4);
    tmp0_serialDesc.t4f('parent', true);
    tmp0_serialDesc.t4f('grouping', true);
    tmp0_serialDesc.t4f('category', true);
    tmp0_serialDesc.t4f('other', true);
    this.tq2_1 = tmp0_serialDesc;
  }
  protoOf($serializer_51).q44 = function () {
    return this.tq2_1;
  };
  protoOf($serializer_51).k4g = function () {
    var tmp0_cached = Companion_getInstance_85().rq2_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_51).s44 = function (decoder) {
    var tmp0_desc = this.tq2_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_85().rq2_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_51).uq2 = function (encoder, value) {
    var tmp0_desc = this.tq2_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_85().rq2_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.vq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, tmp2_cached[0], value.vq2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.wq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.wq2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.xq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, tmp2_cached[2], value.xq2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.yq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, tmp2_cached[3], value.yq2_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_51).r44 = function (encoder, value) {
    return this.uq2(encoder, value instanceof XapiContextActivitiesSurrogate ? value : THROW_CCE());
  };
  var $serializer_instance_51;
  function $serializer_getInstance_63() {
    if ($serializer_instance_51 == null)
      new $serializer_51();
    return $serializer_instance_51;
  }
  function XapiContextActivitiesSurrogate_init_$Init$(seen1, parent, grouping, category, other, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_63().tq2_1);
    }
    if (0 === (seen1 & 1))
      $this.vq2_1 = null;
    else
      $this.vq2_1 = parent;
    if (0 === (seen1 & 2))
      $this.wq2_1 = null;
    else
      $this.wq2_1 = grouping;
    if (0 === (seen1 & 4))
      $this.xq2_1 = null;
    else
      $this.xq2_1 = category;
    if (0 === (seen1 & 8))
      $this.yq2_1 = null;
    else
      $this.yq2_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_85();
    parent = parent === VOID ? null : parent;
    grouping = grouping === VOID ? null : grouping;
    category = category === VOID ? null : category;
    other = other === VOID ? null : other;
    this.vq2_1 = parent;
    this.wq2_1 = grouping;
    this.xq2_1 = category;
    this.yq2_1 = other;
  }
  function toSurrogate(_this__u8e3s4) {
    return new XapiContextActivitiesSurrogate(_this__u8e3s4.mq2_1, _this__u8e3s4.nq2_1, _this__u8e3s4.oq2_1, _this__u8e3s4.pq2_1);
  }
  function toEntities_1(_this__u8e3s4, stringHasher, json, statementUuid) {
    var tmp = toEntities$toEntitiesInternal(_this__u8e3s4.mq2_1, stringHasher, json, statementUuid, 1);
    var tmp_0 = plus(tmp, toEntities$toEntitiesInternal(_this__u8e3s4.nq2_1, stringHasher, json, statementUuid, 2));
    var tmp_1 = plus(tmp_0, toEntities$toEntitiesInternal(_this__u8e3s4.oq2_1, stringHasher, json, statementUuid, 3));
    return plus(tmp_1, toEntities$toEntitiesInternal(_this__u8e3s4.pq2_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.om8(item.aq3_1);
      var scajToHash = stringHasher.om8('' + contextType + '-' + item.aq3_1);
      var statementContextActivityJoin = new StatementContextActivityJoin(statementUuid.cmf(), statementUuid.dmf(), scajToHash, contextType, activityUid, item.aq3_1);
      var tmp0_safe_receiver = item.bq3_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toEntities(tmp0_safe_receiver, item.aq3_1, stringHasher, json);
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.fq1(VOID, VOID, VOID, VOID, statementContextActivityJoin);
      var tmp$ret$0 = tmp2_elvis_lhs == null ? new ActivityEntities(new ActivityEntity(activityUid, item.aq3_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_69() {
    Companion_instance_118 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.qq1_1 = [null, null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_61())];
  }
  protoOf(Companion_69).n4r = function () {
    return $serializer_getInstance_64();
  };
  var Companion_instance_118;
  function Companion_getInstance_86() {
    if (Companion_instance_118 == null)
      new Companion_69();
    return Companion_instance_118;
  }
  function $serializer_52() {
    $serializer_instance_52 = 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.cq3_1 = tmp0_serialDesc;
  }
  protoOf($serializer_52).q44 = function () {
    return this.cq3_1;
  };
  protoOf($serializer_52).k4g = function () {
    var tmp0_cached = Companion_getInstance_86().qq1_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_58()), tmp0_cached[6]];
  };
  protoOf($serializer_52).s44 = function (decoder) {
    var tmp0_desc = this.cq3_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_86().qq1_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_58(), 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_58(), 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_52).dq3 = function (encoder, value) {
    var tmp0_desc = this.cq3_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_86().qq1_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.eq3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.eq3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.fq3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.fq3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.gq3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.gq3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.hq3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.hq3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.iq3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, XapiObjectTypeSerializer_instance, value.iq3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.jq3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, $serializer_getInstance_58(), value.jq3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !equals(value.kq3_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 6, tmp2_cached[6], value.kq3_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_52).r44 = function (encoder, value) {
    return this.dq3(encoder, value instanceof XapiGroup ? value : THROW_CCE());
  };
  var $serializer_instance_52;
  function $serializer_getInstance_64() {
    if ($serializer_instance_52 == null)
      new $serializer_52();
    return $serializer_instance_52;
  }
  function XapiGroup_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_64().cq3_1);
    }
    if (0 === (seen1 & 1))
      $this.eq3_1 = null;
    else
      $this.eq3_1 = name;
    if (0 === (seen1 & 2))
      $this.fq3_1 = null;
    else
      $this.fq3_1 = mbox;
    if (0 === (seen1 & 4))
      $this.gq3_1 = null;
    else
      $this.gq3_1 = mbox_sha1sum;
    if (0 === (seen1 & 8))
      $this.hq3_1 = null;
    else
      $this.hq3_1 = openid;
    if (0 === (seen1 & 16))
      $this.iq3_1 = null;
    else
      $this.iq3_1 = objectType;
    if (0 === (seen1 & 32))
      $this.jq3_1 = null;
    else
      $this.jq3_1 = account;
    if (0 === (seen1 & 64))
      $this.kq3_1 = emptyList();
    else
      $this.kq3_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_86();
    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.eq3_1 = name;
    this.fq3_1 = mbox;
    this.gq3_1 = mbox_sha1sum;
    this.hq3_1 = openid;
    this.iq3_1 = objectType;
    this.jq3_1 = account;
    this.kq3_1 = member;
  }
  protoOf(XapiGroup).kq1 = function () {
    return this.fq3_1;
  };
  protoOf(XapiGroup).lq1 = function () {
    return this.gq3_1;
  };
  protoOf(XapiGroup).mq1 = function () {
    return this.hq3_1;
  };
  protoOf(XapiGroup).zq1 = function () {
    return this.iq3_1;
  };
  protoOf(XapiGroup).nq1 = function () {
    return this.jq3_1;
  };
  protoOf(XapiGroup).toString = function () {
    return 'XapiGroup(name=' + this.eq3_1 + ', mbox=' + this.fq3_1 + ', mbox_sha1sum=' + this.gq3_1 + ', openid=' + this.hq3_1 + ', objectType=' + this.iq3_1 + ', account=' + this.jq3_1 + ', member=' + this.kq3_1 + ')';
  };
  protoOf(XapiGroup).hashCode = function () {
    var result = this.eq3_1 == null ? 0 : getStringHashCode(this.eq3_1);
    result = imul(result, 31) + (this.fq3_1 == null ? 0 : getStringHashCode(this.fq3_1)) | 0;
    result = imul(result, 31) + (this.gq3_1 == null ? 0 : getStringHashCode(this.gq3_1)) | 0;
    result = imul(result, 31) + (this.hq3_1 == null ? 0 : getStringHashCode(this.hq3_1)) | 0;
    result = imul(result, 31) + (this.iq3_1 == null ? 0 : this.iq3_1.hashCode()) | 0;
    result = imul(result, 31) + (this.jq3_1 == null ? 0 : this.jq3_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.kq3_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.eq3_1 == tmp0_other_with_cast.eq3_1))
      return false;
    if (!(this.fq3_1 == tmp0_other_with_cast.fq3_1))
      return false;
    if (!(this.gq3_1 == tmp0_other_with_cast.gq3_1))
      return false;
    if (!(this.hq3_1 == tmp0_other_with_cast.hq3_1))
      return false;
    if (!equals(this.iq3_1, tmp0_other_with_cast.iq3_1))
      return false;
    if (!equals(this.jq3_1, tmp0_other_with_cast.jq3_1))
      return false;
    if (!equals(this.kq3_1, tmp0_other_with_cast.kq3_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.kq3_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.nm8(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.qm8(toByteArray(element.w6_1));
    }
    var memberHash = hasher.rm8();
    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.eq3_1;
    var tmp5_actorMbox = _this__u8e3s4.fq3_1;
    var tmp6_actorMbox_sha1sum = _this__u8e3s4.gq3_1;
    var tmp7_actorOpenid = _this__u8e3s4.hq3_1;
    var tmp0_safe_receiver = _this__u8e3s4.jq3_1;
    var tmp8_actorAccountName = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.jq0_1;
    var tmp1_safe_receiver = _this__u8e3s4.jq3_1;
    var tmp9_actorAccountHomePage = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.iq0_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.zj4_1, item_1.x6_1.zj4_1, modTime);
      destination_1.i1(tmp$ret$8);
    }
    return new ActorEntities(groupActor, tmp_1, destination_1);
  }
  function get_isAnonymous(_this__u8e3s4) {
    return (_this__u8e3s4.fq3_1 == null ? _this__u8e3s4.hq3_1 == null : false) ? _this__u8e3s4.jq3_1 == null : false;
  }
  function sam$kotlin_Comparator$0_0(function_0) {
    this.lq3_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_0).pa = function (a, b) {
    return this.lq3_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.mq3_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_70() {
    Companion_instance_119 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.mq3_1 = lazy(tmp_0, XapiInteractionType$Companion$_anonymous__3zafad);
  }
  protoOf(Companion_70).nq3 = 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.iq1_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_70).n4r = function () {
    return _get_$cachedSerializer__te6jhj_0(this);
  };
  protoOf(Companion_70).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_119;
  function Companion_getInstance_87() {
    XapiInteractionType_initEntries();
    if (Companion_instance_119 == null)
      new Companion_70();
    return Companion_instance_119;
  }
  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_87();
  }
  var $ENTRIES_0;
  function XapiInteractionType(name, ordinal, jsonFieldValue, dbFlag) {
    Enum.call(this, name, ordinal);
    this.iq1_1 = jsonFieldValue;
    this.jq1_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_87().nq3(decoder.d48());
  };
  protoOf(XapiInteractionTypeSerializer).oq3 = function (encoder, value) {
    encoder.l49(value.iq1_1);
  };
  protoOf(XapiInteractionTypeSerializer).r44 = function (encoder, value) {
    return this.oq3(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.pq3_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_71() {
    Companion_instance_120 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.pq3_1 = lazy(tmp_0, XapiObjectType$Companion$_anonymous__v4av7w);
  }
  protoOf(Companion_71).n4r = function () {
    return _get_$cachedSerializer__te6jhj_1(this);
  };
  protoOf(Companion_71).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_120;
  function Companion_getInstance_88() {
    XapiObjectType_initEntries();
    if (Companion_instance_120 == null)
      new Companion_71();
    return Companion_instance_120;
  }
  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_88();
  }
  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).qq3 = function (encoder, value) {
    encoder.l49(value.toString());
  };
  protoOf(XapiObjectTypeSerializer).r44 = function (encoder, value) {
    return this.qq3(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_72() {
  }
  var Companion_instance_121;
  function Companion_getInstance_89() {
    return Companion_instance_121;
  }
  function $serializer_53() {
    $serializer_instance_53 = 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.rq3_1 = tmp0_serialDesc;
  }
  protoOf($serializer_53).q44 = function () {
    return this.rq3_1;
  };
  protoOf($serializer_53).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_53).s44 = function (decoder) {
    var tmp0_desc = this.rq3_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_53).sq3 = function (encoder, value) {
    var tmp0_desc = this.rq3_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.tq3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, FloatSerializer_getInstance(), value.tq3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.uq3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, FloatSerializer_getInstance(), value.uq3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.vq3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, FloatSerializer_getInstance(), value.vq3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.wq3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, FloatSerializer_getInstance(), value.wq3_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_53).r44 = function (encoder, value) {
    return this.sq3(encoder, value instanceof Score ? value : THROW_CCE());
  };
  var $serializer_instance_53;
  function $serializer_getInstance_65() {
    if ($serializer_instance_53 == null)
      new $serializer_53();
    return $serializer_instance_53;
  }
  function Score_init_$Init$(seen1, scaled, raw, min, max, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_65().rq3_1);
    }
    if (0 === (seen1 & 1))
      $this.tq3_1 = null;
    else
      $this.tq3_1 = scaled;
    if (0 === (seen1 & 2))
      $this.uq3_1 = null;
    else
      $this.uq3_1 = raw;
    if (0 === (seen1 & 4))
      $this.vq3_1 = null;
    else
      $this.vq3_1 = min;
    if (0 === (seen1 & 8))
      $this.wq3_1 = null;
    else
      $this.wq3_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.tq3_1 = scaled;
    this.uq3_1 = raw;
    this.vq3_1 = min;
    this.wq3_1 = max;
  }
  protoOf(Score).toString = function () {
    return 'Score(scaled=' + this.tq3_1 + ', raw=' + this.uq3_1 + ', min=' + this.vq3_1 + ', max=' + this.wq3_1 + ')';
  };
  protoOf(Score).hashCode = function () {
    var result = this.tq3_1 == null ? 0 : getNumberHashCode(this.tq3_1);
    result = imul(result, 31) + (this.uq3_1 == null ? 0 : getNumberHashCode(this.uq3_1)) | 0;
    result = imul(result, 31) + (this.vq3_1 == null ? 0 : getNumberHashCode(this.vq3_1)) | 0;
    result = imul(result, 31) + (this.wq3_1 == null ? 0 : getNumberHashCode(this.wq3_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.tq3_1, tmp0_other_with_cast.tq3_1))
      return false;
    if (!equals(this.uq3_1, tmp0_other_with_cast.uq3_1))
      return false;
    if (!equals(this.vq3_1, tmp0_other_with_cast.vq3_1))
      return false;
    if (!equals(this.wq3_1, tmp0_other_with_cast.wq3_1))
      return false;
    return true;
  };
  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.xq3_1 = [null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];
  }
  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.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.yq3_1 = tmp0_serialDesc;
  }
  protoOf($serializer_54).q44 = function () {
    return this.yq3_1;
  };
  protoOf($serializer_54).k4g = function () {
    var tmp0_cached = Companion_getInstance_90().xq3_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_65()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[5])];
  };
  protoOf($serializer_54).s44 = function (decoder) {
    var tmp0_desc = this.yq3_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_90().xq3_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_65(), 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_65(), 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_54).zq3 = function (encoder, value) {
    var tmp0_desc = this.yq3_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_90().xq3_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.mpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, BooleanSerializer_getInstance(), value.mpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.npy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, BooleanSerializer_getInstance(), value.npy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.opy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, $serializer_getInstance_65(), value.opy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.ppy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.ppy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.qpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.qpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.rpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, tmp2_cached[5], value.rpy_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_54).r44 = function (encoder, value) {
    return this.zq3(encoder, value instanceof XapiResult ? value : THROW_CCE());
  };
  var $serializer_instance_54;
  function $serializer_getInstance_66() {
    if ($serializer_instance_54 == null)
      new $serializer_54();
    return $serializer_instance_54;
  }
  function XapiResult_init_$Init$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_66().yq3_1);
    }
    if (0 === (seen1 & 1))
      $this.mpy_1 = null;
    else
      $this.mpy_1 = completion;
    if (0 === (seen1 & 2))
      $this.npy_1 = null;
    else
      $this.npy_1 = success;
    if (0 === (seen1 & 4))
      $this.opy_1 = null;
    else
      $this.opy_1 = score;
    if (0 === (seen1 & 8))
      $this.ppy_1 = null;
    else
      $this.ppy_1 = duration;
    if (0 === (seen1 & 16))
      $this.qpy_1 = null;
    else
      $this.qpy_1 = response;
    if (0 === (seen1 & 32))
      $this.rpy_1 = null;
    else
      $this.rpy_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_90();
    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.mpy_1 = completion;
    this.npy_1 = success;
    this.opy_1 = score;
    this.ppy_1 = duration;
    this.qpy_1 = response;
    this.rpy_1 = extensions;
  }
  protoOf(XapiResult).toString = function () {
    return 'XapiResult(completion=' + this.mpy_1 + ', success=' + this.npy_1 + ', score=' + this.opy_1 + ', duration=' + this.ppy_1 + ', response=' + this.qpy_1 + ', extensions=' + this.rpy_1 + ')';
  };
  protoOf(XapiResult).hashCode = function () {
    var result = this.mpy_1 == null ? 0 : getBooleanHashCode(this.mpy_1);
    result = imul(result, 31) + (this.npy_1 == null ? 0 : getBooleanHashCode(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 : getStringHashCode(this.ppy_1)) | 0;
    result = imul(result, 31) + (this.qpy_1 == null ? 0 : getStringHashCode(this.qpy_1)) | 0;
    result = imul(result, 31) + (this.rpy_1 == null ? 0 : hashCode(this.rpy_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.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 (!(this.ppy_1 == tmp0_other_with_cast.ppy_1))
      return false;
    if (!(this.qpy_1 == tmp0_other_with_cast.qpy_1))
      return false;
    if (!equals(this.rpy_1, tmp0_other_with_cast.rpy_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_74() {
    Companion_instance_123 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.ipw_1 = [null, null, null, null, null, null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_57()), null];
  }
  protoOf(Companion_74).n4r = function () {
    return $serializer_getInstance_67();
  };
  var Companion_instance_123;
  function Companion_getInstance_91() {
    if (Companion_instance_123 == null)
      new Companion_74();
    return Companion_instance_123;
  }
  function $serializer_55() {
    $serializer_instance_55 = 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.aq4_1 = tmp0_serialDesc;
  }
  protoOf($serializer_55).q44 = function () {
    return this.aq4_1;
  };
  protoOf($serializer_55).k4g = function () {
    var tmp0_cached = Companion_getInstance_91().ipw_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_70(), XapiStatementObjectSerializer_getInstance(), get_nullable($serializer_getInstance_66()), get_nullable($serializer_getInstance_62()), 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_55).s44 = function (decoder) {
    var tmp0_desc = this.aq4_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_91().ipw_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_70(), 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_66(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp16_input.w48(tmp0_desc, 5, $serializer_getInstance_62(), 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_70(), 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_66(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp16_input.w48(tmp0_desc, 5, $serializer_getInstance_62(), 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_55).bq4 = function (encoder, value) {
    var tmp0_desc = this.aq4_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_91().ipw_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.vpv_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.vpv_1);
    }
    tmp1_output.y49(tmp0_desc, 1, XapiActorSerializer_getInstance(), value.wpv_1);
    tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_70(), value.xpv_1);
    tmp1_output.y49(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), value.ypv_1);
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.zpv_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, $serializer_getInstance_66(), value.zpv_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.apw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, $serializer_getInstance_62(), value.apw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.bpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, StringSerializer_getInstance(), value.bpw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.cpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 7, StringSerializer_getInstance(), value.cpw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.dpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 8, XapiActorSerializer_getInstance(), value.dpw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 9) ? true : !(value.epw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 9, StringSerializer_getInstance(), value.epw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 10) ? true : !(value.fpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 10, tmp2_cached[10], value.fpw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 11) ? true : !(value.gpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 11, XapiObjectTypeSerializer_instance, value.gpw_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_55).r44 = function (encoder, value) {
    return this.bq4(encoder, value instanceof XapiStatement ? value : THROW_CCE());
  };
  var $serializer_instance_55;
  function $serializer_getInstance_67() {
    if ($serializer_instance_55 == null)
      new $serializer_55();
    return $serializer_instance_55;
  }
  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_67().aq4_1);
    }
    if (0 === (seen1 & 1))
      $this.vpv_1 = null;
    else
      $this.vpv_1 = id;
    $this.wpv_1 = actor;
    $this.xpv_1 = verb;
    $this.ypv_1 = object;
    if (0 === (seen1 & 16))
      $this.zpv_1 = null;
    else
      $this.zpv_1 = result;
    if (0 === (seen1 & 32))
      $this.apw_1 = null;
    else
      $this.apw_1 = context;
    if (0 === (seen1 & 64))
      $this.bpw_1 = null;
    else
      $this.bpw_1 = timestamp;
    if (0 === (seen1 & 128))
      $this.cpw_1 = null;
    else
      $this.cpw_1 = stored;
    if (0 === (seen1 & 256))
      $this.dpw_1 = null;
    else
      $this.dpw_1 = authority;
    if (0 === (seen1 & 512))
      $this.epw_1 = null;
    else
      $this.epw_1 = version;
    if (0 === (seen1 & 1024))
      $this.fpw_1 = null;
    else
      $this.fpw_1 = attachments;
    if (0 === (seen1 & 2048))
      $this.gpw_1 = null;
    else
      $this.gpw_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_91();
    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.vpv_1 = id;
    this.wpv_1 = actor;
    this.xpv_1 = verb;
    this.ypv_1 = object;
    this.zpv_1 = result;
    this.apw_1 = context;
    this.bpw_1 = timestamp;
    this.cpw_1 = stored;
    this.dpw_1 = authority;
    this.epw_1 = version;
    this.fpw_1 = attachments;
    this.gpw_1 = objectType;
  }
  protoOf(XapiStatement).zq1 = function () {
    return this.gpw_1;
  };
  protoOf(XapiStatement).cq4 = 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).hpw = function (id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, $super) {
    id = id === VOID ? this.vpv_1 : id;
    actor = actor === VOID ? this.wpv_1 : actor;
    verb = verb === VOID ? this.xpv_1 : verb;
    object = object === VOID ? this.ypv_1 : object;
    result = result === VOID ? this.zpv_1 : result;
    context = context === VOID ? this.apw_1 : context;
    timestamp = timestamp === VOID ? this.bpw_1 : timestamp;
    stored = stored === VOID ? this.cpw_1 : stored;
    authority = authority === VOID ? this.dpw_1 : authority;
    version = version === VOID ? this.epw_1 : version;
    attachments = attachments === VOID ? this.fpw_1 : attachments;
    objectType = objectType === VOID ? this.gpw_1 : objectType;
    return $super === VOID ? this.cq4(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) : $super.cq4.call(this, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType);
  };
  protoOf(XapiStatement).toString = function () {
    return 'XapiStatement(id=' + this.vpv_1 + ', actor=' + this.wpv_1 + ', verb=' + this.xpv_1 + ', object=' + this.ypv_1 + ', result=' + this.zpv_1 + ', context=' + this.apw_1 + ', timestamp=' + this.bpw_1 + ', stored=' + this.cpw_1 + ', authority=' + this.dpw_1 + ', version=' + this.epw_1 + ', attachments=' + this.fpw_1 + ', objectType=' + this.gpw_1 + ')';
  };
  protoOf(XapiStatement).hashCode = function () {
    var result = this.vpv_1 == null ? 0 : getStringHashCode(this.vpv_1);
    result = imul(result, 31) + hashCode(this.wpv_1) | 0;
    result = imul(result, 31) + this.xpv_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.ypv_1) | 0;
    result = imul(result, 31) + (this.zpv_1 == null ? 0 : this.zpv_1.hashCode()) | 0;
    result = imul(result, 31) + (this.apw_1 == null ? 0 : this.apw_1.hashCode()) | 0;
    result = imul(result, 31) + (this.bpw_1 == null ? 0 : getStringHashCode(this.bpw_1)) | 0;
    result = imul(result, 31) + (this.cpw_1 == null ? 0 : getStringHashCode(this.cpw_1)) | 0;
    result = imul(result, 31) + (this.dpw_1 == null ? 0 : hashCode(this.dpw_1)) | 0;
    result = imul(result, 31) + (this.epw_1 == null ? 0 : getStringHashCode(this.epw_1)) | 0;
    result = imul(result, 31) + (this.fpw_1 == null ? 0 : hashCode(this.fpw_1)) | 0;
    result = imul(result, 31) + (this.gpw_1 == null ? 0 : this.gpw_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.vpv_1 == tmp0_other_with_cast.vpv_1))
      return false;
    if (!equals(this.wpv_1, tmp0_other_with_cast.wpv_1))
      return false;
    if (!this.xpv_1.equals(tmp0_other_with_cast.xpv_1))
      return false;
    if (!equals(this.ypv_1, tmp0_other_with_cast.ypv_1))
      return false;
    if (!equals(this.zpv_1, tmp0_other_with_cast.zpv_1))
      return false;
    if (!equals(this.apw_1, tmp0_other_with_cast.apw_1))
      return false;
    if (!(this.bpw_1 == tmp0_other_with_cast.bpw_1))
      return false;
    if (!(this.cpw_1 == tmp0_other_with_cast.cpw_1))
      return false;
    if (!equals(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 (!equals(this.gpw_1, tmp0_other_with_cast.gpw_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.lpv_1 = statementEntity;
    this.mpv_1 = statementEntityJson;
    this.npv_1 = actorEntities;
    this.opv_1 = verbEntities;
    this.ppv_1 = activityEntities;
  }
  protoOf(StatementEntities).toString = function () {
    return 'StatementEntities(statementEntity=' + this.lpv_1 + ', statementEntityJson=' + this.mpv_1 + ', actorEntities=' + this.npv_1 + ', verbEntities=' + this.opv_1 + ', activityEntities=' + this.ppv_1 + ')';
  };
  protoOf(StatementEntities).hashCode = function () {
    var result = this.lpv_1 == null ? 0 : this.lpv_1.hashCode();
    result = imul(result, 31) + (this.mpv_1 == null ? 0 : this.mpv_1.hashCode()) | 0;
    result = imul(result, 31) + (this.npv_1 == null ? 0 : hashCode(this.npv_1)) | 0;
    result = imul(result, 31) + (this.opv_1 == null ? 0 : this.opv_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ppv_1 == null ? 0 : hashCode(this.ppv_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.lpv_1, tmp0_other_with_cast.lpv_1))
      return false;
    if (!equals(this.mpv_1, tmp0_other_with_cast.mpv_1))
      return false;
    if (!equals(this.npv_1, tmp0_other_with_cast.npv_1))
      return false;
    if (!equals(this.opv_1, tmp0_other_with_cast.opv_1))
      return false;
    if (!equals(this.ppv_1, tmp0_other_with_cast.ppv_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.vpv_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.ypv_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.apw_1;
    var contextRegistration = xapiRequireValidUuidOrNull(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.eq2_1, 'Invalid context registration uuid');
    var statementActorEntities = toEntities_0(_this__u8e3s4.wpv_1, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var tmp3_safe_receiver = _this__u8e3s4.dpw_1;
    var authorityActor = tmp3_safe_receiver == null ? null : toEntities_0(tmp3_safe_receiver, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var tmp4_safe_receiver = _this__u8e3s4.apw_1;
    var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.dq2_1;
    var contextInstructorActorEntities = tmp5_safe_receiver == null ? null : toEntities_0(tmp5_safe_receiver, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var statementObjectForeignKeys = objectForeignKeys(_this__u8e3s4.ypv_1, stringHasher, statementUuid);
    var tmp34_statementIdHi = statementUuid.cmf();
    var tmp35_statementIdLo = statementUuid.dmf();
    var tmp_3;
    var tmp_4;
    var tmp6_safe_receiver = _this__u8e3s4.wpv_1.nq1();
    if ((tmp6_safe_receiver == null ? null : tmp6_safe_receiver.iq0_1) === learningSpace.xnv_1) {
      var tmp7_safe_receiver = _this__u8e3s4.wpv_1.nq1();
      tmp_4 = (tmp7_safe_receiver == null ? null : tmp7_safe_receiver.jq0_1) === xapiSession.uk0_1;
    } else {
      tmp_4 = false;
    }
    if (tmp_4) {
      tmp_3 = xapiSession.sk0_1;
    } else {
      tmp_3 = new Long(0, 0);
    }
    var tmp36_statementActorPersonUid = tmp_3;
    var tmp37_statementActorUid = statementActorEntities.qpv_1.zj4_1;
    var tmp9_safe_receiver = authorityActor == null ? null : authorityActor.qpv_1;
    var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.zj4_1;
    var tmp38_authorityActorUid = tmp10_elvis_lhs == null ? new Long(0, 0) : tmp10_elvis_lhs;
    var tmp39_statementVerbUid = stringHasher.om8(xapiRequireValidIRI(_this__u8e3s4.xpv_1.dq4_1, 'Statement ' + statementUuid + ' VerbID ' + _this__u8e3s4.xpv_1.dq4_1 + ' is not a valid IRI'));
    var tmp11_safe_receiver = _this__u8e3s4.zpv_1;
    var tmp40_resultCompletion = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.mpy_1;
    var tmp12_safe_receiver = _this__u8e3s4.zpv_1;
    var tmp41_resultSuccess = tmp12_safe_receiver == null ? null : tmp12_safe_receiver.npy_1;
    var tmp13_safe_receiver = _this__u8e3s4.zpv_1;
    var tmp14_safe_receiver = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.opy_1;
    var tmp42_resultScoreScaled = tmp14_safe_receiver == null ? null : tmp14_safe_receiver.tq3_1;
    var tmp15_safe_receiver = _this__u8e3s4.zpv_1;
    var tmp16_safe_receiver = tmp15_safe_receiver == null ? null : tmp15_safe_receiver.opy_1;
    var tmp43_resultScoreRaw = tmp16_safe_receiver == null ? null : tmp16_safe_receiver.uq3_1;
    var tmp17_safe_receiver = _this__u8e3s4.zpv_1;
    var tmp18_safe_receiver = tmp17_safe_receiver == null ? null : tmp17_safe_receiver.opy_1;
    var tmp44_resultScoreMin = tmp18_safe_receiver == null ? null : tmp18_safe_receiver.vq3_1;
    var tmp19_safe_receiver = _this__u8e3s4.zpv_1;
    var tmp20_safe_receiver = tmp19_safe_receiver == null ? null : tmp19_safe_receiver.opy_1;
    var tmp45_resultScoreMax = tmp20_safe_receiver == null ? null : tmp20_safe_receiver.wq3_1;
    var tmp21_safe_receiver = _this__u8e3s4.zpv_1;
    var tmp46_resultDuration = xapiRequireDurationOrNullAsLong(tmp21_safe_receiver == null ? null : tmp21_safe_receiver.ppy_1);
    var tmp22_safe_receiver = _this__u8e3s4.zpv_1;
    var tmp47_resultResponse = tmp22_safe_receiver == null ? null : tmp22_safe_receiver.qpy_1;
    var tmp23_safe_receiver = _this__u8e3s4.bpw_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.cmf();
    var tmp50_contextRegistrationHi = tmp26_elvis_lhs == null ? new Long(0, 0) : tmp26_elvis_lhs;
    var tmp28_elvis_lhs = contextRegistration == null ? null : contextRegistration.dmf();
    var tmp51_contextRegistrationLo = tmp28_elvis_lhs == null ? new Long(0, 0) : tmp28_elvis_lhs;
    var tmp29_safe_receiver = _this__u8e3s4.apw_1;
    var tmp52_contextPlatform = tmp29_safe_receiver == null ? null : tmp29_safe_receiver.gq2_1;
    var tmp31_safe_receiver = contextInstructorActorEntities == null ? null : contextInstructorActorEntities.qpv_1;
    var tmp32_elvis_lhs = tmp31_safe_receiver == null ? null : tmp31_safe_receiver.zj4_1;
    var tmp53_contextInstructorActorUid = tmp32_elvis_lhs == null ? new Long(0, 0) : tmp32_elvis_lhs;
    var tmp54_statementContentEntryUid = xapiSession.xk0_1;
    var tmp55_statementClazzUid = xapiSession.vk0_1;
    var tmp56_statementCbUid = xapiSession.wk0_1;
    var tmp_6;
    if (isCompletionOrProgress(_this__u8e3s4)) {
      var tmp_7;
      if (xapiSession.xk0_1.equals(new Long(0, 0))) {
        tmp_7 = true;
      } else {
        var tmp_8 = _this__u8e3s4.ypv_1;
        var tmp33_safe_receiver = tmp_8 instanceof XapiActivityStatementObject ? tmp_8 : null;
        tmp_7 = (tmp33_safe_receiver == null ? null : tmp33_safe_receiver.aq3_1) === xapiSession.zk0_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.ypv_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.cmf(), statementUuid.dmf(), 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.xpv_1, stringHasher);
    var tmp62_safe_receiver = _this__u8e3s4.apw_1;
    var tmp63_safe_receiver = tmp62_safe_receiver == null ? null : tmp62_safe_receiver.kq2_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.ypv_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.zpv_1;
    if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.mpy_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_124.n4r();
        break;
      case 3:
        tmp_2 = Companion_instance_114.n4r();
        break;
      case 4:
        tmp_2 = Companion_getInstance_86().n4r();
        break;
      case 0:
        tmp_2 = Companion_instance_125.n4r();
        break;
      case 1:
        tmp_2 = Companion_getInstance_91().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_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.XapiActivityStatementObject', this, 3);
    tmp0_serialDesc.t4f('objectType', true);
    tmp0_serialDesc.t4f('id', false);
    tmp0_serialDesc.t4f('definition', true);
    this.hq4_1 = tmp0_serialDesc;
  }
  protoOf($serializer_56).q44 = function () {
    return this.hq4_1;
  };
  protoOf($serializer_56).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_60())];
  };
  protoOf($serializer_56).s44 = function (decoder) {
    var tmp0_desc = this.hq4_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_60(), 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_60(), 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_56).iq4 = function (encoder, value) {
    var tmp0_desc = this.hq4_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.zq2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, XapiObjectTypeSerializer_instance, value.zq2_1);
    }
    tmp1_output.w49(tmp0_desc, 1, value.aq3_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.bq3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, $serializer_getInstance_60(), value.bq3_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_56).r44 = function (encoder, value) {
    return this.iq4(encoder, value instanceof XapiActivityStatementObject ? value : THROW_CCE());
  };
  var $serializer_instance_56;
  function $serializer_getInstance_68() {
    if ($serializer_instance_56 == null)
      new $serializer_56();
    return $serializer_instance_56;
  }
  function XapiActivityStatementObject_init_$Init$(seen1, objectType, id, definition, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_68().hq4_1);
    }
    if (0 === (seen1 & 1))
      $this.zq2_1 = null;
    else
      $this.zq2_1 = objectType;
    $this.aq3_1 = id;
    if (0 === (seen1 & 4))
      $this.bq3_1 = null;
    else
      $this.bq3_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.zq2_1 = objectType;
    this.aq3_1 = id;
    this.bq3_1 = definition;
  }
  protoOf(XapiActivityStatementObject).zq1 = function () {
    return this.zq2_1;
  };
  protoOf(XapiActivityStatementObject).toString = function () {
    return 'XapiActivityStatementObject(objectType=' + this.zq2_1 + ', id=' + this.aq3_1 + ', definition=' + this.bq3_1 + ')';
  };
  protoOf(XapiActivityStatementObject).hashCode = function () {
    var result = this.zq2_1 == null ? 0 : this.zq2_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.aq3_1) | 0;
    result = imul(result, 31) + (this.bq3_1 == null ? 0 : this.bq3_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.zq2_1, tmp0_other_with_cast.zq2_1))
      return false;
    if (!(this.aq3_1 === tmp0_other_with_cast.aq3_1))
      return false;
    if (!equals(this.bq3_1, tmp0_other_with_cast.bq3_1))
      return false;
    return true;
  };
  function objectForeignKeys(_this__u8e3s4, stringHasher, statementUuid) {
    var tmp;
    if (_this__u8e3s4 instanceof XapiActivityStatementObject) {
      tmp = new Pair(stringHasher.om8(_this__u8e3s4.aq3_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.kq4_1);
            tmp = new Pair(uuid.cmf(), uuid.dmf());
          } else {
            if (_this__u8e3s4 instanceof XapiStatement) {
              var tmp_0 = statementUuid.cmf();
              // Inline function 'kotlin.Long.plus' call
              var tmp$ret$0 = statementUuid.dmf().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.bq3_1, _this__u8e3s4.aq3_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.cmf();
            // Inline function 'kotlin.Long.plus' call
            var tmp$ret$0 = parentStatementUuid.dmf().lc(toLong(1));
            tmp = toEntities_3(_this__u8e3s4.hpw(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.zq1();
    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_76() {
  }
  protoOf(Companion_76).n4r = function () {
    return $serializer_getInstance_69();
  };
  var Companion_instance_125;
  function Companion_getInstance_93() {
    return Companion_instance_125;
  }
  function $serializer_57() {
    $serializer_instance_57 = 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.lq4_1 = tmp0_serialDesc;
  }
  protoOf($serializer_57).q44 = function () {
    return this.lq4_1;
  };
  protoOf($serializer_57).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_57).s44 = function (decoder) {
    var tmp0_desc = this.lq4_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_57).mq4 = function (encoder, value) {
    var tmp0_desc = this.lq4_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, XapiObjectTypeSerializer_instance, value.jq4_1);
    tmp1_output.w49(tmp0_desc, 1, value.kq4_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_57).r44 = function (encoder, value) {
    return this.mq4(encoder, value instanceof XapiStatementRef ? value : THROW_CCE());
  };
  var $serializer_instance_57;
  function $serializer_getInstance_69() {
    if ($serializer_instance_57 == null)
      new $serializer_57();
    return $serializer_instance_57;
  }
  function XapiStatementRef_init_$Init$(seen1, objectType, id, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_69().lq4_1);
    }
    $this.jq4_1 = objectType;
    $this.kq4_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).zq1 = function () {
    return this.jq4_1;
  };
  protoOf(XapiStatementRef).toString = function () {
    return 'XapiStatementRef(objectType=' + this.jq4_1 + ', id=' + this.kq4_1 + ')';
  };
  protoOf(XapiStatementRef).hashCode = function () {
    var result = this.jq4_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.kq4_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.jq4_1.equals(tmp0_other_with_cast.jq4_1))
      return false;
    if (!(this.kq4_1 === tmp0_other_with_cast.kq4_1))
      return false;
    return true;
  };
  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.nq4_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];
  }
  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.model.XapiVerb', this, 2);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('display', true);
    this.oq4_1 = tmp0_serialDesc;
  }
  protoOf($serializer_58).q44 = function () {
    return this.oq4_1;
  };
  protoOf($serializer_58).k4g = function () {
    var tmp0_cached = Companion_getInstance_94().nq4_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_58).s44 = function (decoder) {
    var tmp0_desc = this.oq4_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().nq4_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_58).pq4 = function (encoder, value) {
    var tmp0_desc = this.oq4_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_94().nq4_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.dq4_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.dq4_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.eq4_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.eq4_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_58).r44 = function (encoder, value) {
    return this.pq4(encoder, value instanceof XapiVerb ? value : THROW_CCE());
  };
  var $serializer_instance_58;
  function $serializer_getInstance_70() {
    if ($serializer_instance_58 == null)
      new $serializer_58();
    return $serializer_instance_58;
  }
  function XapiVerb_init_$Init$(seen1, id, display, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_70().oq4_1);
    }
    if (0 === (seen1 & 1))
      $this.dq4_1 = null;
    else
      $this.dq4_1 = id;
    if (0 === (seen1 & 2))
      $this.eq4_1 = null;
    else
      $this.eq4_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_94();
    id = id === VOID ? null : id;
    display = display === VOID ? null : display;
    this.dq4_1 = id;
    this.eq4_1 = display;
  }
  protoOf(XapiVerb).toString = function () {
    return 'XapiVerb(id=' + this.dq4_1 + ', display=' + this.eq4_1 + ')';
  };
  protoOf(XapiVerb).hashCode = function () {
    var result = this.dq4_1 == null ? 0 : getStringHashCode(this.dq4_1);
    result = imul(result, 31) + (this.eq4_1 == null ? 0 : hashCode(this.eq4_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.dq4_1 == tmp0_other_with_cast.dq4_1))
      return false;
    if (!equals(this.eq4_1, tmp0_other_with_cast.eq4_1))
      return false;
    return true;
  };
  function get_VERB_COMPLETED() {
    return VERB_COMPLETED;
  }
  var VERB_COMPLETED;
  function VerbEntities(verbEntity, verbLangMapEntries) {
    this.tpv_1 = verbEntity;
    this.upv_1 = verbLangMapEntries;
  }
  protoOf(VerbEntities).toString = function () {
    return 'VerbEntities(verbEntity=' + this.tpv_1 + ', verbLangMapEntries=' + this.upv_1 + ')';
  };
  protoOf(VerbEntities).hashCode = function () {
    var result = this.tpv_1.hashCode();
    result = imul(result, 31) + hashCode(this.upv_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.tpv_1.equals(tmp0_other_with_cast.tpv_1))
      return false;
    if (!equals(this.upv_1, tmp0_other_with_cast.upv_1))
      return false;
    return true;
  };
  function toVerbEntities(_this__u8e3s4, xxHasher) {
    var verbIri = xapiRequireValidIRI(_this__u8e3s4.dq4_1);
    var verbUid = xxHasher.om8(verbIri);
    var tmp = new VerbEntity(verbUid, _this__u8e3s4.dq4_1);
    var tmp0_safe_receiver = _this__u8e3s4.eq4_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.om8(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.tq4_1, $this.wq4_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.vq4_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.bq5(false);
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_0 = $this.xq4_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.yq4_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.kq5_1 = this$0;
    this.lq5_1 = $usageDurationVal;
    this.mq5_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.kq5_1.sq4_1.fon(listOf_0(createXapiStatement(this.kq5_1, this.lq5_1.lc(this.mq5_1), 100, true)), this.kq5_1.tq4_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.kq5_1, this.lq5_1, this.mq5_1, completion);
    i.nq5_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.qq4_1 = saveStatementOnClearUseCase;
    this.rq4_1 = saveStatementOnUnloadUseCase;
    this.sq4_1 = xapiStatementResource;
    this.tq4_1 = xapiSession;
    this.uq4_1 = scope;
    this.vq4_1 = xapiActivityProvider;
    this.wq4_1 = learningSpace;
    this.xq4_1 = atomic$long$1(new Long(0, 0));
    this.yq4_1 = atomic$int$1(0);
    this.zq4_1 = atomic$long$1(new Long(0, 0));
    this.aq5_1 = atomic$boolean$1(false);
  }
  protoOf(NonInteractiveContentXapiStatementRecorder).bq5 = 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.zq4_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.zq4_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.xq4_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).oq5 = function (progress) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.yq4_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).pq5 = 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.aq5_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.xq4_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.zq4_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.yq4_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.uq4_1, VOID, VOID, NonInteractiveContentXapiStatementRecorder$onComplete$slambda_0(this, usageDurationVal, timeSinceActive, null));
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).bm9 = function () {
    this.qq4_1.qq5(listOf_0(createFinalStatement(this)), this.tq4_1);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).rq5 = function () {
    var tmp0_safe_receiver = this.rq4_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.qq5(listOf_0(createFinalStatement(this)), this.tq4_1);
    }
  };
  function NonInteractiveContentXapiStatementRecorderFactory(saveStatementOnClearUseCase, saveStatementOnUnloadUseCase, xapiStatementResource, learningSpace) {
    this.sq5_1 = saveStatementOnClearUseCase;
    this.tq5_1 = saveStatementOnUnloadUseCase;
    this.uq5_1 = xapiStatementResource;
    this.vq5_1 = learningSpace;
  }
  protoOf(NonInteractiveContentXapiStatementRecorderFactory).wq5 = function (xapiSession, scope, xapiActivityProvider) {
    return new NonInteractiveContentXapiStatementRecorder(this.sq5_1, this.tq5_1, this.uq5_1, xapiSession, scope, xapiActivityProvider, this.vq5_1);
  };
  function SaveStatementOnClearUseCase() {
  }
  function SaveStatementOnUnloadUseCase() {
  }
  function Companion_78() {
    Companion_instance_127 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.xq5_1 = [new ArrayListSerializer($serializer_getInstance_67()), null];
  }
  protoOf(Companion_78).n4r = function () {
    return $serializer_getInstance_71();
  };
  var Companion_instance_127;
  function Companion_getInstance_95() {
    if (Companion_instance_127 == null)
      new Companion_78();
    return Companion_instance_127;
  }
  function $serializer_59() {
    $serializer_instance_59 = 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.yq5_1 = tmp0_serialDesc;
  }
  protoOf($serializer_59).q44 = function () {
    return this.yq5_1;
  };
  protoOf($serializer_59).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_95().xq5_1[0], $serializer_getInstance_6()];
  };
  protoOf($serializer_59).s44 = function (decoder) {
    var tmp0_desc = this.yq5_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_95().xq5_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_59).zq5 = function (encoder, value) {
    var tmp0_desc = this.yq5_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_95().xq5_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.aq6_1);
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance_6(), value.bq6_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_59).r44 = function (encoder, value) {
    return this.zq5(encoder, value instanceof XapiStatementsAndSession ? value : THROW_CCE());
  };
  var $serializer_instance_59;
  function $serializer_getInstance_71() {
    if ($serializer_instance_59 == null)
      new $serializer_59();
    return $serializer_instance_59;
  }
  function XapiStatementsAndSession_init_$Init$(seen1, statements, session, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_71().yq5_1);
    }
    $this.aq6_1 = statements;
    $this.bq6_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_95();
    this.aq6_1 = statements;
    this.bq6_1 = session;
  }
  protoOf(XapiStatementsAndSession).toString = function () {
    return 'XapiStatementsAndSession(statements=' + this.aq6_1 + ', session=' + this.bq6_1 + ')';
  };
  protoOf(XapiStatementsAndSession).hashCode = function () {
    var result = hashCode(this.aq6_1);
    result = imul(result, 31) + this.bq6_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.aq6_1, tmp0_other_with_cast.aq6_1))
      return false;
    if (!this.bq6_1.equals(tmp0_other_with_cast.bq6_1))
      return false;
    return true;
  };
  function ResumeOrStartXapiSessionUseCase() {
  }
  function UstadMobileConstants() {
    UstadMobileConstants_instance = this;
    this.cq6_1 = 'UTF-8';
    this.dq6_1 = 0;
    this.eq6_1 = 'UTC';
    this.fq6_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.gq6_1 = ['ar', 'arc', 'dv', 'fa', 'ha', 'he', 'khw', 'ks', 'ku', 'ps', 'ur', 'yi'];
    this.hq6_1 = 13;
    this.iq6_1 = 18;
    this.jq6_1 = 10000;
    this.kq6_1 = 512;
  }
  var UstadMobileConstants_instance;
  function UstadMobileConstants_getInstance() {
    if (UstadMobileConstants_instance == null)
      new UstadMobileConstants();
    return UstadMobileConstants_instance;
  }
  function Companion_79() {
    Companion_instance_128 = this;
    this.lq6_1 = new UstadGoOptions(null, false);
  }
  var Companion_instance_128;
  function Companion_getInstance_96() {
    if (Companion_instance_128 == null)
      new Companion_79();
    return Companion_instance_128;
  }
  function UstadGoOptions(popUpToViewName, popUpToInclusive, clearStack, serializer) {
    Companion_getInstance_96();
    popUpToViewName = popUpToViewName === VOID ? null : popUpToViewName;
    popUpToInclusive = popUpToInclusive === VOID ? false : popUpToInclusive;
    clearStack = clearStack === VOID ? false : clearStack;
    serializer = serializer === VOID ? null : serializer;
    this.mq6_1 = popUpToViewName;
    this.nq6_1 = popUpToInclusive;
    this.oq6_1 = clearStack;
    this.pq6_1 = serializer;
  }
  protoOf(UstadGoOptions).toString = function () {
    return 'UstadGoOptions(popUpToViewName=' + this.mq6_1 + ', popUpToInclusive=' + this.nq6_1 + ', clearStack=' + this.oq6_1 + ', serializer=' + this.pq6_1 + ')';
  };
  protoOf(UstadGoOptions).hashCode = function () {
    var result = this.mq6_1 == null ? 0 : getStringHashCode(this.mq6_1);
    result = imul(result, 31) + getBooleanHashCode(this.nq6_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.oq6_1) | 0;
    result = imul(result, 31) + (this.pq6_1 == null ? 0 : hashCode(this.pq6_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.mq6_1 == tmp0_other_with_cast.mq6_1))
      return false;
    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 (!equals(this.pq6_1, tmp0_other_with_cast.pq6_1))
      return false;
    return true;
  };
  function UiLanguage(langCode, langDisplay) {
    this.qq6_1 = langCode;
    this.rq6_1 = langDisplay;
  }
  protoOf(UiLanguage).toString = function () {
    return 'UiLanguage(langCode=' + this.qq6_1 + ', langDisplay=' + this.rq6_1 + ')';
  };
  protoOf(UiLanguage).hashCode = function () {
    var result = getStringHashCode(this.qq6_1);
    result = imul(result, 31) + getStringHashCode(this.rq6_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.qq6_1 === tmp0_other_with_cast.qq6_1))
      return false;
    if (!(this.rq6_1 === tmp0_other_with_cast.rq6_1))
      return false;
    return true;
  };
  function Companion_80() {
    Companion_instance_129 = this;
    this.sq6_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.sq6_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.tq6_1 = destination;
    this.uq6_1 = 'ustadmobileContent';
    this.vq6_1 = '';
    this.PREFKEY_LOCALE = 'locale';
    this.wq6_1 = 2;
    this.xq6_1 = 4;
    this.yq6_1 = 'ref';
    this.zq6_1 = 67108864;
    this.aq7_1 = 'dlenabled';
    this.bq7_1 = 16;
    this.cq7_1 = 32;
    this.dq7_1 = 64;
    this.eq7_1 = 'umclient';
    this.fq7_1 = '/umapp/#/';
    this.gq7_1 = 'sitedata';
    this.hq7_1 = 'container';
    this.iq7_1 = 'attachments';
    this.jq7_1 = 'rootViewName';
    this.kq7_1 = 'client_id';
  }
  protoOf(Companion_80).lq7 = function () {
    return this.PREFKEY_LOCALE;
  };
  var Companion_instance_129;
  function Companion_getInstance_97() {
    if (Companion_instance_129 == null)
      new Companion_80();
    return Companion_instance_129;
  }
  function UstadMobileSystemCommon(settings, langConfig) {
    Companion_getInstance_97();
    this.mq7_1 = settings;
    this.nq7_1 = langConfig;
    this.oq7_1 = null;
  }
  protoOf(UstadMobileSystemCommon).pq7 = function () {
    Companion_getInstance_141();
    return 'CourseListHome';
  };
  protoOf(UstadMobileSystemCommon).qq7 = 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.vol(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.rq7_1 = visible;
    this.sq7_1 = text;
    this.tq7_1 = enabled;
    this.uq7_1 = onClick;
  }
  protoOf(ActionBarButtonUiState).vq7 = function (visible, text, enabled, onClick) {
    return new ActionBarButtonUiState(visible, text, enabled, onClick);
  };
  protoOf(ActionBarButtonUiState).wq7 = function (visible, text, enabled, onClick, $super) {
    visible = visible === VOID ? this.rq7_1 : visible;
    text = text === VOID ? this.sq7_1 : text;
    enabled = enabled === VOID ? this.tq7_1 : enabled;
    onClick = onClick === VOID ? this.uq7_1 : onClick;
    return $super === VOID ? this.vq7(visible, text, enabled, onClick) : $super.vq7.call(this, visible, text, enabled, onClick);
  };
  protoOf(ActionBarButtonUiState).toString = function () {
    return 'ActionBarButtonUiState(visible=' + this.rq7_1 + ', text=' + this.sq7_1 + ', enabled=' + this.tq7_1 + ', onClick=' + this.uq7_1 + ')';
  };
  protoOf(ActionBarButtonUiState).hashCode = function () {
    var result = getBooleanHashCode(this.rq7_1);
    result = imul(result, 31) + (this.sq7_1 == null ? 0 : getStringHashCode(this.sq7_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tq7_1) | 0;
    result = imul(result, 31) + hashCode(this.uq7_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.rq7_1 === tmp0_other_with_cast.rq7_1))
      return false;
    if (!(this.sq7_1 == tmp0_other_with_cast.sq7_1))
      return false;
    if (!(this.tq7_1 === tmp0_other_with_cast.tq7_1))
      return false;
    if (!equals(this.uq7_1, tmp0_other_with_cast.uq7_1))
      return false;
    return true;
  };
  function AppActionButton(icon, contentDescription, onClick, id) {
    this.xq7_1 = icon;
    this.yq7_1 = contentDescription;
    this.zq7_1 = onClick;
    this.aq8_1 = id;
  }
  protoOf(AppActionButton).toString = function () {
    return 'AppActionButton(icon=' + this.xq7_1 + ', contentDescription=' + this.yq7_1 + ', onClick=' + this.zq7_1 + ', id=' + this.aq8_1 + ')';
  };
  protoOf(AppActionButton).hashCode = function () {
    var result = this.xq7_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.yq7_1) | 0;
    result = imul(result, 31) + hashCode(this.zq7_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.aq8_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.xq7_1.equals(tmp0_other_with_cast.xq7_1))
      return false;
    if (!(this.yq7_1 === tmp0_other_with_cast.yq7_1))
      return false;
    if (!equals(this.zq7_1, tmp0_other_with_cast.zq7_1))
      return false;
    if (!(this.aq8_1 === tmp0_other_with_cast.aq8_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.bq8_1 = visible;
    this.cq8_1 = searchText;
    this.dq8_1 = onSearchTextChanged;
  }
  protoOf(AppBarSearchUiState).eq8 = function (visible, searchText, onSearchTextChanged) {
    return new AppBarSearchUiState(visible, searchText, onSearchTextChanged);
  };
  protoOf(AppBarSearchUiState).fq8 = function (visible, searchText, onSearchTextChanged, $super) {
    visible = visible === VOID ? this.bq8_1 : visible;
    searchText = searchText === VOID ? this.cq8_1 : searchText;
    onSearchTextChanged = onSearchTextChanged === VOID ? this.dq8_1 : onSearchTextChanged;
    return $super === VOID ? this.eq8(visible, searchText, onSearchTextChanged) : $super.eq8.call(this, visible, searchText, onSearchTextChanged);
  };
  protoOf(AppBarSearchUiState).toString = function () {
    return 'AppBarSearchUiState(visible=' + this.bq8_1 + ', searchText=' + this.cq8_1 + ', onSearchTextChanged=' + this.dq8_1 + ')';
  };
  protoOf(AppBarSearchUiState).hashCode = function () {
    var result = getBooleanHashCode(this.bq8_1);
    result = imul(result, 31) + getStringHashCode(this.cq8_1) | 0;
    result = imul(result, 31) + hashCode(this.dq8_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.bq8_1 === tmp0_other_with_cast.bq8_1))
      return false;
    if (!(this.cq8_1 === tmp0_other_with_cast.cq8_1))
      return false;
    if (!equals(this.dq8_1, tmp0_other_with_cast.dq8_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.gq8_1 = fabState;
    this.hq8_1 = loadingState;
    this.iq8_1 = title;
    this.jq8_1 = navigationVisible;
    this.kq8_1 = hideBottomNavigation;
    this.lq8_1 = hideSettingsIcon;
    this.mq8_1 = userAccountIconVisible;
    this.nq8_1 = searchState;
    this.oq8_1 = actionBarButtonState;
    this.pq8_1 = overflowItems;
    this.qq8_1 = hideAppBar;
    this.rq8_1 = actionButtons;
    this.sq8_1 = leadingActionButton;
    this.tq8_1 = appBarColors;
  }
  protoOf(AppUiState).uq8 = 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).vq8 = function (fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors, $super) {
    fabState = fabState === VOID ? this.gq8_1 : fabState;
    loadingState = loadingState === VOID ? this.hq8_1 : loadingState;
    title = title === VOID ? this.iq8_1 : title;
    navigationVisible = navigationVisible === VOID ? this.jq8_1 : navigationVisible;
    hideBottomNavigation = hideBottomNavigation === VOID ? this.kq8_1 : hideBottomNavigation;
    hideSettingsIcon = hideSettingsIcon === VOID ? this.lq8_1 : hideSettingsIcon;
    userAccountIconVisible = userAccountIconVisible === VOID ? this.mq8_1 : userAccountIconVisible;
    searchState = searchState === VOID ? this.nq8_1 : searchState;
    actionBarButtonState = actionBarButtonState === VOID ? this.oq8_1 : actionBarButtonState;
    overflowItems = overflowItems === VOID ? this.pq8_1 : overflowItems;
    hideAppBar = hideAppBar === VOID ? this.qq8_1 : hideAppBar;
    actionButtons = actionButtons === VOID ? this.rq8_1 : actionButtons;
    leadingActionButton = leadingActionButton === VOID ? this.sq8_1 : leadingActionButton;
    appBarColors = appBarColors === VOID ? this.tq8_1 : appBarColors;
    return $super === VOID ? this.uq8(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) : $super.uq8.call(this, fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors);
  };
  protoOf(AppUiState).toString = function () {
    return 'AppUiState(fabState=' + this.gq8_1 + ', loadingState=' + this.hq8_1 + ', title=' + this.iq8_1 + ', navigationVisible=' + this.jq8_1 + ', hideBottomNavigation=' + this.kq8_1 + ', hideSettingsIcon=' + this.lq8_1 + ', userAccountIconVisible=' + this.mq8_1 + ', searchState=' + this.nq8_1 + ', actionBarButtonState=' + this.oq8_1 + ', overflowItems=' + this.pq8_1 + ', hideAppBar=' + this.qq8_1 + ', actionButtons=' + this.rq8_1 + ', leadingActionButton=' + this.sq8_1 + ', appBarColors=' + this.tq8_1 + ')';
  };
  protoOf(AppUiState).hashCode = function () {
    var result = this.gq8_1.hashCode();
    result = imul(result, 31) + this.hq8_1.hashCode() | 0;
    result = imul(result, 31) + (this.iq8_1 == null ? 0 : getStringHashCode(this.iq8_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jq8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kq8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lq8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mq8_1) | 0;
    result = imul(result, 31) + this.nq8_1.hashCode() | 0;
    result = imul(result, 31) + this.oq8_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.pq8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qq8_1) | 0;
    result = imul(result, 31) + hashCode(this.rq8_1) | 0;
    result = imul(result, 31) + (this.sq8_1 == null ? 0 : this.sq8_1.hashCode()) | 0;
    result = imul(result, 31) + this.tq8_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.gq8_1.equals(tmp0_other_with_cast.gq8_1))
      return false;
    if (!this.hq8_1.equals(tmp0_other_with_cast.hq8_1))
      return false;
    if (!(this.iq8_1 == tmp0_other_with_cast.iq8_1))
      return false;
    if (!(this.jq8_1 === tmp0_other_with_cast.jq8_1))
      return false;
    if (!(this.kq8_1 === tmp0_other_with_cast.kq8_1))
      return false;
    if (!(this.lq8_1 === tmp0_other_with_cast.lq8_1))
      return false;
    if (!(this.mq8_1 === tmp0_other_with_cast.mq8_1))
      return false;
    if (!this.nq8_1.equals(tmp0_other_with_cast.nq8_1))
      return false;
    if (!this.oq8_1.equals(tmp0_other_with_cast.oq8_1))
      return false;
    if (!equals(this.pq8_1, tmp0_other_with_cast.pq8_1))
      return false;
    if (!(this.qq8_1 === tmp0_other_with_cast.qq8_1))
      return false;
    if (!equals(this.rq8_1, tmp0_other_with_cast.rq8_1))
      return false;
    if (!equals(this.sq8_1, tmp0_other_with_cast.sq8_1))
      return false;
    if (!this.tq8_1.equals(tmp0_other_with_cast.tq8_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.wq8_1 = visible;
    this.xq8_1 = text;
    this.yq8_1 = icon;
    this.zq8_1 = onClick;
  }
  protoOf(FabUiState).aq9 = function (visible, text, icon, onClick) {
    return new FabUiState(visible, text, icon, onClick);
  };
  protoOf(FabUiState).bq9 = function (visible, text, icon, onClick, $super) {
    visible = visible === VOID ? this.wq8_1 : visible;
    text = text === VOID ? this.xq8_1 : text;
    icon = icon === VOID ? this.yq8_1 : icon;
    onClick = onClick === VOID ? this.zq8_1 : onClick;
    return $super === VOID ? this.aq9(visible, text, icon, onClick) : $super.aq9.call(this, visible, text, icon, onClick);
  };
  protoOf(FabUiState).toString = function () {
    return 'FabUiState(visible=' + this.wq8_1 + ', text=' + this.xq8_1 + ', icon=' + this.yq8_1 + ', onClick=' + this.zq8_1 + ')';
  };
  protoOf(FabUiState).hashCode = function () {
    var result = getBooleanHashCode(this.wq8_1);
    result = imul(result, 31) + (this.xq8_1 == null ? 0 : getStringHashCode(this.xq8_1)) | 0;
    result = imul(result, 31) + this.yq8_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.zq8_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.wq8_1 === tmp0_other_with_cast.wq8_1))
      return false;
    if (!(this.xq8_1 == tmp0_other_with_cast.xq8_1))
      return false;
    if (!this.yq8_1.equals(tmp0_other_with_cast.yq8_1))
      return false;
    if (!equals(this.zq8_1, tmp0_other_with_cast.zq8_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_81() {
    Companion_instance_130 = this;
    this.cq9_1 = new LoadingUiState(State_INDETERMINATE_getInstance());
    this.dq9_1 = new LoadingUiState(State_NOT_LOADING_getInstance());
  }
  var Companion_instance_130;
  function Companion_getInstance_98() {
    if (Companion_instance_130 == null)
      new Companion_81();
    return Companion_instance_130;
  }
  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_98();
    loadingState = loadingState === VOID ? State_NOT_LOADING_getInstance() : loadingState;
    this.eq9_1 = loadingState;
  }
  protoOf(LoadingUiState).toString = function () {
    return 'LoadingUiState(loadingState=' + this.eq9_1 + ')';
  };
  protoOf(LoadingUiState).hashCode = function () {
    return this.eq9_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.eq9_1.equals(tmp0_other_with_cast.eq9_1))
      return false;
    return true;
  };
  function OverflowItem(label, onClick) {
    this.fq9_1 = label;
    this.gq9_1 = onClick;
  }
  protoOf(OverflowItem).toString = function () {
    return 'OverflowItem(label=' + this.fq9_1 + ', onClick=' + this.gq9_1 + ')';
  };
  protoOf(OverflowItem).hashCode = function () {
    var result = getStringHashCode(this.fq9_1);
    result = imul(result, 31) + hashCode(this.gq9_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.fq9_1 === tmp0_other_with_cast.fq9_1))
      return false;
    if (!equals(this.gq9_1, tmp0_other_with_cast.gq9_1))
      return false;
    return true;
  };
  function Snack(message, action, onAction) {
    action = action === VOID ? null : action;
    onAction = onAction === VOID ? null : onAction;
    this.hq9_1 = message;
    this.iq9_1 = action;
    this.jq9_1 = onAction;
  }
  protoOf(Snack).toString = function () {
    return 'Snack(message=' + this.hq9_1 + ', action=' + this.iq9_1 + ', onAction=' + this.jq9_1 + ')';
  };
  protoOf(Snack).hashCode = function () {
    var result = getStringHashCode(this.hq9_1);
    result = imul(result, 31) + (this.iq9_1 == null ? 0 : getStringHashCode(this.iq9_1)) | 0;
    result = imul(result, 31) + (this.jq9_1 == null ? 0 : hashCode(this.jq9_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.hq9_1 === tmp0_other_with_cast.hq9_1))
      return false;
    if (!(this.iq9_1 == tmp0_other_with_cast.iq9_1))
      return false;
    if (!equals(this.jq9_1, tmp0_other_with_cast.jq9_1))
      return false;
    return true;
  };
  function SnackBarDispatcher() {
  }
  function TabItem(viewName, args, label) {
    this.lq9_1 = viewName;
    this.mq9_1 = args;
    this.nq9_1 = label;
  }
  protoOf(TabItem).toString = function () {
    return 'TabItem(viewName=' + this.lq9_1 + ', args=' + this.mq9_1 + ', label=' + this.nq9_1 + ')';
  };
  protoOf(TabItem).hashCode = function () {
    var result = getStringHashCode(this.lq9_1);
    result = imul(result, 31) + hashCode(this.mq9_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.nq9_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.lq9_1 === tmp0_other_with_cast.lq9_1))
      return false;
    if (!equals(this.mq9_1, tmp0_other_with_cast.mq9_1))
      return false;
    if (!(this.nq9_1 === tmp0_other_with_cast.nq9_1))
      return false;
    return true;
  };
  function UstadContextMenuItem(label, onClick) {
    this.oq9_1 = label;
    this.pq9_1 = onClick;
  }
  protoOf(UstadContextMenuItem).toString = function () {
    return 'UstadContextMenuItem(label=' + this.oq9_1 + ', onClick=' + this.pq9_1 + ')';
  };
  protoOf(UstadContextMenuItem).hashCode = function () {
    var result = getStringHashCode(this.oq9_1);
    result = imul(result, 31) + hashCode(this.pq9_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.oq9_1 === tmp0_other_with_cast.oq9_1))
      return false;
    if (!equals(this.pq9_1, tmp0_other_with_cast.pq9_1))
      return false;
    return true;
  };
  function BuildConfigMap(delegate) {
    this.qq9_1 = delegate;
  }
  protoOf(BuildConfigMap).ba = function (key) {
    return this.qq9_1.q(key);
  };
  function Companion_82() {
    this.rq9_1 = '1,2,4';
  }
  var Companion_instance_131;
  function Companion_getInstance_99() {
    return Companion_instance_131;
  }
  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.sq9_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().vq9_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.sq9_1.a1(element_0.yq9_1)) {
        destination_1.i1(element_0);
      }
    }
    tmp_0.tq9_1 = destination_1;
    var tmp_1 = this;
    var tmp_2 = strings_getInstance().omj_1;
    tmp_1.uq9_1 = plus(this.tq9_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.zq9_1 = settings;
  }
  protoOf(SettingsLocaleSettingDelegate).aqa = function (value) {
    if (!(value == null)) {
      this.zq9_1.em9('locale', value);
    } else {
      this.zq9_1.a2o('locale');
    }
  };
  protoOf(SettingsLocaleSettingDelegate).bqa = function () {
    return this.zq9_1.fm9('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.cqa().qq6_1;
    } else {
      tmp = setting;
    }
    return tmp;
  }
  function Companion_83() {
    this.dqa_1 = 'locale';
    this.eqa_1 = 'com.ustadmobile.presetlocale';
    this.fqa_1 = 'localePresetDone';
    this.gqa_1 = 'en,fa,ps,ar,tg,bn,ne,my,rw,ru';
    this.hqa_1 = '';
  }
  var Companion_instance_132;
  function Companion_getInstance_100() {
    return Companion_instance_132;
  }
  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.mpo_1 = systemLocales;
    this.npo_1 = localeSettingDelegate;
    this.opo_1 = availableLanguagesConfig;
    this.ppo_1 = fallbackLocaleCode;
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = sorted(split(this.opo_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().fq6_1.q(item);
      var tmp$ret$0 = new UiLanguage(item, tmp0_elvis_lhs == null ? item : tmp0_elvis_lhs);
      destination.i1(tmp$ret$0);
    }
    tmp.qpo_1 = destination;
    var tmp_0 = this;
    // Inline function 'kotlin.collections.associateBy' call
    var this_1 = this.qpo_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.qq6_1;
      destination_0.s(tmp$ret$3, element);
    }
    tmp_0.rpo_1 = destination_0;
    this.spo_1 = displayLocaleForLangSetting(this, this.bqa());
    if (!this.rpo_1.r(this.ppo_1))
      throw IllegalStateException_init_$Create$('available languages ' + this.opo_1 + ' does not ' + ("include fallback: '" + this.ppo_1 + "'"));
  }
  protoOf(SupportedLanguagesConfig).aqa = function (value) {
    this.npo_1.aqa(value);
    this.spo_1 = displayLocaleForLangSetting(this, value);
  };
  protoOf(SupportedLanguagesConfig).bqa = function () {
    return this.npo_1.bqa();
  };
  protoOf(SupportedLanguagesConfig).iqa = function (systemImpl) {
    var tmp0_elvis_lhs = this.bqa();
    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.jqa(systemImpl).w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.getCurrentLanguage.<anonymous>' call
        if (element.qq6_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).kqa = function (useDeviceLangDisplay) {
    Companion_getInstance_97();
    return plus(listOf_0(new UiLanguage('', useDeviceLangDisplay)), this.qpo_1);
  };
  protoOf(SupportedLanguagesConfig).jqa = function (systemImpl) {
    return this.kqa(systemImpl.vol(strings_getInstance().un5_1));
  };
  protoOf(SupportedLanguagesConfig).lqa = function (preferredLocales) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.qpo_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.qq6_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.rpo_1.q(tmp$ret$8));
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? ensureNotNull(this.rpo_1.q(this.ppo_1)) : tmp1_elvis_lhs;
  };
  protoOf(SupportedLanguagesConfig).cqa = function (preferredLocales, $super) {
    preferredLocales = preferredLocales === VOID ? this.mpo_1 : preferredLocales;
    return $super === VOID ? this.lqa(preferredLocales) : $super.lqa.call(this, preferredLocales);
  };
  function Companion_84() {
  }
  protoOf(Companion_84).mqa = 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_133;
  function Companion_getInstance_101() {
    return Companion_instance_133;
  }
  function SystemUrlConfig(systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl) {
    presetLearningSpaceUrl = presetLearningSpaceUrl === VOID ? null : presetLearningSpaceUrl;
    newPersonalAccountsLearningSpaceUrl = newPersonalAccountsLearningSpaceUrl === VOID ? null : newPersonalAccountsLearningSpaceUrl;
    this.ho8_1 = systemBaseUrl;
    this.io8_1 = presetLearningSpaceUrl;
    this.jo8_1 = newPersonalAccountsLearningSpaceUrl;
    this.ko8_1 = this.io8_1 == null;
  }
  protoOf(SystemUrlConfig).nqa = function (systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl) {
    return new SystemUrlConfig(systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl);
  };
  protoOf(SystemUrlConfig).oqa = function (systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl, $super) {
    systemBaseUrl = systemBaseUrl === VOID ? this.ho8_1 : systemBaseUrl;
    presetLearningSpaceUrl = presetLearningSpaceUrl === VOID ? this.io8_1 : presetLearningSpaceUrl;
    newPersonalAccountsLearningSpaceUrl = newPersonalAccountsLearningSpaceUrl === VOID ? this.jo8_1 : newPersonalAccountsLearningSpaceUrl;
    return $super === VOID ? this.nqa(systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl) : $super.nqa.call(this, systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl);
  };
  protoOf(SystemUrlConfig).toString = function () {
    return 'SystemUrlConfig(systemBaseUrl=' + this.ho8_1 + ', presetLearningSpaceUrl=' + this.io8_1 + ', newPersonalAccountsLearningSpaceUrl=' + this.jo8_1 + ')';
  };
  protoOf(SystemUrlConfig).hashCode = function () {
    var result = getStringHashCode(this.ho8_1);
    result = imul(result, 31) + (this.io8_1 == null ? 0 : getStringHashCode(this.io8_1)) | 0;
    result = imul(result, 31) + (this.jo8_1 == null ? 0 : getStringHashCode(this.jo8_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.ho8_1 === tmp0_other_with_cast.ho8_1))
      return false;
    if (!(this.io8_1 == tmp0_other_with_cast.io8_1))
      return false;
    if (!(this.jo8_1 == tmp0_other_with_cast.jo8_1))
      return false;
    return true;
  };
  function Companion_85() {
    this.pqa_1 = 'com.ustadmobile.gopts';
    this.qqa_1 = 'com.ustadmobile.showpoweredbymsg';
    this.rqa_1 = 'com.ustadmobile.system.systemBaseUrl';
    this.sqa_1 = 'com.ustadmobile.system.presetLsUrl';
    this.tqa_1 = 'com.ustadmobile.system.newPersonalAccountsLsUrl';
  }
  var Companion_instance_134;
  function Companion_getInstance_102() {
    return Companion_instance_134;
  }
  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$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 ConsentRequestToParentUseCaseSendToServerImpl(tmp_1, tmp_2, tmp$ret$3);
  }
  function commonClientDomainDiModule$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(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(SendConsentRequestToParentUseCase), 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 = commonClientDomainDiModule$lambda$lambda_0;
      var tmp_7 = this_1.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_8 = typeToken(createKType(getKClass(ConsentRequestToParentUseCaseSendToServerImpl), 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(GetUsernameSuggestionUseCase), 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.singleton' 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 = commonClientDomainDiModule$lambda$lambda_1;
      var tmp_12 = this_2.c56();
      var tmp_13 = this_2.b56();
      var tmp_14 = this_2.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_15 = typeToken(createKType(getKClass(GetUsernameSuggestionUseCase), arrayOf([]), false));
      var tmp$ret$16 = isInterface(tmp_15, TypeToken) ? tmp_15 : THROW_CCE();
      var tmp$ret$17 = new Singleton(tmp_12, tmp_13, tmp_14, tmp$ret$16, null, true, creator_1);
      tmp_10.c5b(tmp$ret$17);
      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.yk3_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).yk3_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).yk3_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).bk4();
    // 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.bk4());
  }
  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.bk4());
  }
  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.bk4());
  }
  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).bk4();
    // 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).bk4();
    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).bk4();
    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) {
    return new CreateCredentialUsernameUseCase($this$singleton.od());
  }
  function commonDomainDiModule$lambda$lambda_16($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().dnw_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(CreateCredentialUsernameUseCase), 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(CreateCredentialUsernameUseCase), 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(ParseCredentialUsernameUseCase), 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
      var creator_16 = commonDomainDiModule$lambda$lambda_16;
      var tmp_99 = $this$$receiver.c56();
      var tmp_100 = $this$$receiver.b56();
      var tmp_101 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_102 = typeToken(createKType(getKClass(ParseCredentialUsernameUseCase), arrayOf([]), false));
      var tmp$ret$102 = isInterface(tmp_102, TypeToken) ? tmp_102 : THROW_CCE();
      var tmp$ret$103 = new Singleton(tmp_99, tmp_100, tmp_101, tmp$ret$102, null, true, creator_16);
      tmp_98.c5b(tmp$ret$103);
      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_86() {
    Companion_instance_135 = this;
    this.uqa_1 = new CourseTerminologyStrings(emptyList());
  }
  var Companion_instance_135;
  function Companion_getInstance_103() {
    if (Companion_instance_135 == null)
      new Companion_86();
    return Companion_instance_135;
  }
  function CourseTerminologyStrings(terminologyEntries, terminologyKey) {
    Companion_getInstance_103();
    terminologyKey = terminologyKey === VOID ? null : terminologyKey;
    this.vqa_1 = terminologyEntries;
    this.wqa_1 = terminologyKey;
  }
  protoOf(CourseTerminologyStrings).xqa = function (messageId) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.vqa_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.impl.locale.CourseTerminologyStrings.get.<anonymous>' call
        if (element.zqa_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.aqb_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.vqa_1, this.vqa_1);
  };
  protoOf(CourseTerminologyStrings).hashCode = function () {
    return hashCode(this.vqa_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.xqa(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.yqa_1 = id;
    this.zqa_1 = stringResource;
    this.aqb_1 = term;
    this.bqb_1 = errorMessage;
  }
  protoOf(TerminologyEntry).cqb = function (id, stringResource, term, errorMessage) {
    return new TerminologyEntry(id, stringResource, term, errorMessage);
  };
  protoOf(TerminologyEntry).dqb = function (id, stringResource, term, errorMessage, $super) {
    id = id === VOID ? this.yqa_1 : id;
    stringResource = stringResource === VOID ? this.zqa_1 : stringResource;
    term = term === VOID ? this.aqb_1 : term;
    errorMessage = errorMessage === VOID ? this.bqb_1 : errorMessage;
    return $super === VOID ? this.cqb(id, stringResource, term, errorMessage) : $super.cqb.call(this, id, stringResource, term, errorMessage);
  };
  protoOf(TerminologyEntry).toString = function () {
    return 'TerminologyEntry(id=' + this.yqa_1 + ', stringResource=' + this.zqa_1 + ', term=' + this.aqb_1 + ', errorMessage=' + this.bqb_1 + ')';
  };
  protoOf(TerminologyEntry).hashCode = function () {
    var result = getStringHashCode(this.yqa_1);
    result = imul(result, 31) + this.zqa_1.hashCode() | 0;
    result = imul(result, 31) + (this.aqb_1 == null ? 0 : getStringHashCode(this.aqb_1)) | 0;
    result = imul(result, 31) + (this.bqb_1 == null ? 0 : getStringHashCode(this.bqb_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.yqa_1 === tmp0_other_with_cast.yqa_1))
      return false;
    if (!this.zqa_1.equals(tmp0_other_with_cast.zqa_1))
      return false;
    if (!(this.aqb_1 == tmp0_other_with_cast.aqb_1))
      return false;
    if (!(this.bqb_1 == tmp0_other_with_cast.bqb_1))
      return false;
    return true;
  };
  function ClazzEnrolmentListConstants() {
    ClazzEnrolmentListConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(1000, strings_getInstance().on6_1);
    var tmp_1 = to(1001, strings_getInstance().bn0_1);
    var tmp_2 = to(1003, strings_getInstance().bnh_1);
    tmp.eqb_1 = mapOf([tmp_0, tmp_1, tmp_2, to(1002, strings_getInstance().yn9_1)]);
    var tmp_3 = this;
    var tmp_4 = to(202, strings_getInstance().qmz_1);
    var tmp_5 = to(201, strings_getInstance().amz_1);
    var tmp_6 = to(203, strings_getInstance().bmz_1);
    tmp_3.fqb_1 = mapOf([tmp_4, tmp_5, tmp_6, to(200, strings_getInstance().pmz_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().hmu_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 200);
    var tmp_2 = strings_getInstance().imu_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 201);
    var tmp_4 = strings_getInstance().jmu_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 202);
    var tmp_6 = strings_getInstance().kmu_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 203);
    var tmp_8 = strings_getInstance().nmu_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 205);
    var tmp_10 = strings_getInstance().lmu_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 206);
    var tmp_12 = strings_getInstance().mmu_1;
    tmp.gqb_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().rmn_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 100);
    var tmp_2 = strings_getInstance().nmn_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 102);
    var tmp_4 = strings_getInstance().mmn_1;
    tmp.hqb_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().gnj_1;
    Companion_getInstance_4();
    var tmp_1 = new MessageIdOption2(tmp_0, 102);
    var tmp_2 = strings_getInstance().gnl_1;
    Companion_getInstance_4();
    tmp.iqb_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().bmu_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 100);
    var tmp_2 = strings_getInstance().cmu_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 101);
    var tmp_4 = strings_getInstance().dmu_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 102);
    var tmp_6 = strings_getInstance().emu_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 103);
    var tmp_8 = strings_getInstance().fmu_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 104);
    var tmp_10 = strings_getInstance().gmu_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 105);
    var tmp_12 = strings_getInstance().nmz_1;
    var tmp_13 = new MessageIdOption2(tmp_12, 106);
    var tmp_14 = strings_getInstance().omz_1;
    tmp.jqb_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().smv_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().tmv_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().umv_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 3);
    var tmp_6 = strings_getInstance().vmv_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 4);
    var tmp_8 = strings_getInstance().ymv_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 5);
    var tmp_10 = strings_getInstance().wmv_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 6);
    var tmp_12 = strings_getInstance().xmv_1;
    var tmp_13 = new MessageIdOption2(tmp_12, 7);
    var tmp_14 = strings_getInstance().amm_1;
    var tmp_15 = new MessageIdOption2(tmp_14, 8);
    var tmp_16 = strings_getInstance().zmv_1;
    var tmp_17 = new MessageIdOption2(tmp_16, 9);
    var tmp_18 = strings_getInstance().bmm_1;
    tmp.kqb_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().pmz_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 200);
    var tmp_2 = strings_getInstance().amz_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 201);
    var tmp_4 = strings_getInstance().mmn_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 202);
    var tmp_6 = strings_getInstance().bmz_1;
    tmp.lqb_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().zml_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().yml_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().amm_1;
    tmp.vq9_1 = listOf([tmp_1, tmp_3, new MessageIdOption2(tmp_4, 4)]);
    var tmp_5 = this;
    var tmp_6 = strings_getInstance().bmm_1;
    tmp_5.wq9_1 = plus(listOf_0(new MessageIdOption2(tmp_6, 0)), this.vq9_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().umw_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().tmw_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().wnc_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 4);
    var tmp_6 = strings_getInstance().amm_1;
    tmp.mqb_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().on6_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1000);
    var tmp_2 = strings_getInstance().bn0_1;
    tmp.nqb_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.oqb_1 = listOf([new MessageIdOption2(strings_getInstance().dmy_1, Companion_instance_29.okx_1), new MessageIdOption2(strings_getInstance().emy_1, Companion_instance_29.ikx_1), new MessageIdOption2(strings_getInstance().fmy_1, Companion_instance_29.jkx_1), new MessageIdOption2(strings_getInstance().gmy_1, Companion_instance_29.kkx_1), new MessageIdOption2(strings_getInstance().hmy_1, Companion_instance_29.lkx_1), new MessageIdOption2(strings_getInstance().imy_1, Companion_instance_29.mkx_1), new MessageIdOption2(strings_getInstance().jmy_1, Companion_instance_29.nkx_1)]);
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.oqb_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.yq9_1, item.xq9_1);
      destination.i1(tmp$ret$0);
    }
    tmp.pqb_1 = toMap(destination);
    this.qqb_1 = mapOf([to(Companion_instance_29.dkx_1, strings_getInstance().amy_1), to(Companion_instance_29.ekx_1, strings_getInstance().ymx_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().inl_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().jnl_1;
    tmp.rqb_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.sqb_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.tqb_1 = asSharedFlow(this.sqb_1);
  }
  protoOf(CommandFlowUstadNavController).uqb = function (viewName, args, goOptions) {
    this.sqb_1.i1h(new NavigateNavCommand(viewName, args, goOptions));
  };
  protoOf(CommandFlowUstadNavController).vqb = function (viewName, inclusive) {
    this.sqb_1.i1h(new PopNavCommand(viewName, inclusive));
  };
  function NavCommand(timestamp) {
    this.wqb_1 = timestamp;
  }
  function NavigateNavCommand(viewName, args, goOptions) {
    NavCommand.call(this, systemTimeInMillis());
    this.yqb_1 = viewName;
    this.zqb_1 = args;
    this.aqc_1 = goOptions;
  }
  protoOf(NavigateNavCommand).toString = function () {
    return 'NavigateNavCommand(viewName=' + this.yqb_1 + ', args=' + this.zqb_1 + ', goOptions=' + this.aqc_1 + ')';
  };
  protoOf(NavigateNavCommand).hashCode = function () {
    var result = getStringHashCode(this.yqb_1);
    result = imul(result, 31) + hashCode(this.zqb_1) | 0;
    result = imul(result, 31) + this.aqc_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.yqb_1 === tmp0_other_with_cast.yqb_1))
      return false;
    if (!equals(this.zqb_1, tmp0_other_with_cast.zqb_1))
      return false;
    if (!this.aqc_1.equals(tmp0_other_with_cast.aqc_1))
      return false;
    return true;
  };
  function PopNavCommand(viewName, inclusive) {
    NavCommand.call(this, systemTimeInMillis());
    this.cqc_1 = viewName;
    this.dqc_1 = inclusive;
  }
  protoOf(PopNavCommand).toString = function () {
    return 'PopNavCommand(viewName=' + this.cqc_1 + ', inclusive=' + this.dqc_1 + ')';
  };
  protoOf(PopNavCommand).hashCode = function () {
    var result = getStringHashCode(this.cqc_1);
    result = imul(result, 31) + getBooleanHashCode(this.dqc_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.cqc_1 === tmp0_other_with_cast.cqc_1))
      return false;
    if (!(this.dqc_1 === tmp0_other_with_cast.dqc_1))
      return false;
    return true;
  };
  function NavResult(key, timestamp, result) {
    this.eqc_1 = key;
    this.fqc_1 = timestamp;
    this.gqc_1 = result;
  }
  protoOf(NavResult).toString = function () {
    return 'NavResult(key=' + this.eqc_1 + ', timestamp=' + this.fqc_1.toString() + ', result=' + toString_0(this.gqc_1) + ')';
  };
  protoOf(NavResult).hashCode = function () {
    var result = getStringHashCode(this.eqc_1);
    result = imul(result, 31) + this.fqc_1.hashCode() | 0;
    result = imul(result, 31) + (this.gqc_1 == null ? 0 : hashCode(this.gqc_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.eqc_1 === tmp0_other_with_cast.eqc_1))
      return false;
    if (!this.fqc_1.equals(tmp0_other_with_cast.fqc_1))
      return false;
    if (!equals(this.gqc_1, tmp0_other_with_cast.gqc_1))
      return false;
    return true;
  };
  function NavResultDest(viewName, key) {
    this.hqc_1 = viewName;
    this.iqc_1 = key;
  }
  function NavResultReturner() {
  }
  function NavResultReturnerImpl$resultFlowForKey$o$collect$slambda($$this$unsafeFlow, $key, resultContinuation) {
    this.tqc_1 = $$this$unsafeFlow;
    this.uqc_1 = $key;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).zqc = function (value, $completion) {
    var tmp = this.aqd(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.zqc(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.xqc_1 = this.tqc_1;
            var tmp_1 = this;
            tmp_1.yqc_1 = this.vqc_1;
            if (this.yqc_1.eqc_1 === this.uqc_1) {
              this.hd_1 = 3;
              suspendResult = this.xqc_1.t1d(this.yqc_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.wqc_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).aqd = function (value, completion) {
    var i = new NavResultReturnerImpl$resultFlowForKey$o$collect$slambda(this.tqc_1, this.uqc_1, completion);
    i.vqc_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.zqc(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$50(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.jqd_1 = _this__u8e3s4;
    this.kqd_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.lqd_1 = this.kqd_1;
            this.hd_1 = 1;
            var tmp_1 = NavResultReturnerImpl$resultFlowForKey$o$collect$slambda_0(this.lqd_1, this.jqd_1.nqd_1, null);
            suspendResult = this.jqd_1.mqd_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.oqd_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_1).t1d = function (value, $completion) {
    return this.oqd_1(value, $completion);
  };
  function _no_name_provided__qut3iv_0($this, $key) {
    this.mqd_1 = $this;
    this.nqd_1 = $key;
  }
  protoOf(_no_name_provided__qut3iv_0).pqd = 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.pqd(collector, $completion);
  };
  function NavResultReturnerImpl() {
    this.qqd_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
  }
  protoOf(NavResultReturnerImpl).jqc = function (key) {
    // Inline function 'kotlinx.coroutines.flow.filter' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = this.qqd_1;
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    return new _no_name_provided__qut3iv_0(this_0, key);
  };
  protoOf(NavResultReturnerImpl).kqc = function (result) {
    this.qqd_1.i1h(result);
  };
  function UstadNavController() {
  }
  function BitmaskFlag(flagVal, stringResource, enabled) {
    enabled = enabled === VOID ? false : enabled;
    this.rqd_1 = flagVal;
    this.sqd_1 = stringResource;
    this.tqd_1 = enabled;
  }
  protoOf(BitmaskFlag).uqd = function (flagVal, stringResource, enabled) {
    return new BitmaskFlag(flagVal, stringResource, enabled);
  };
  protoOf(BitmaskFlag).vqd = function (flagVal, stringResource, enabled, $super) {
    flagVal = flagVal === VOID ? this.rqd_1 : flagVal;
    stringResource = stringResource === VOID ? this.sqd_1 : stringResource;
    enabled = enabled === VOID ? this.tqd_1 : enabled;
    return $super === VOID ? this.uqd(flagVal, stringResource, enabled) : $super.uqd.call(this, flagVal, stringResource, enabled);
  };
  protoOf(BitmaskFlag).toString = function () {
    return 'BitmaskFlag(flagVal=' + this.rqd_1.toString() + ', stringResource=' + this.sqd_1 + ', enabled=' + this.tqd_1 + ')';
  };
  protoOf(BitmaskFlag).hashCode = function () {
    var result = this.rqd_1.hashCode();
    result = imul(result, 31) + this.sqd_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tqd_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.rqd_1.equals(tmp0_other_with_cast.rqd_1))
      return false;
    if (!this.sqd_1.equals(tmp0_other_with_cast.sqd_1))
      return false;
    if (!(this.tqd_1 === tmp0_other_with_cast.tqd_1))
      return false;
    return true;
  };
  function ListPagingSource(list) {
    PagingSource.call(this);
    this.xqd_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.xqd_1.u();
    var b = startFrom + loadSize | 0;
    var tmp$ret$0 = Math.min(a, b);
    var subList = this.xqd_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.xqd_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.yqd_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.qpb_1 = aType;
    this.rpb_1 = lang;
    this.tpb_1 = null;
    this.upb_1 = null;
    this.vpb_1 = null;
    this.wpb_1 = null;
    this.xpb_1 = new JsonObject(mapOf_0(to('id', JsonPrimitive_0(id))));
    this.spb_1 = id;
  }
  protoOf(Activity).zqd = function (key, value) {
    // Inline function 'kotlin.collections.isNullOrEmpty' call
    var this_0 = this.wpb_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.wpb_1 = LinkedHashMap_init_$Create$();
    }
    // Inline function 'kotlin.collections.set' call
    ensureNotNull(this.wpb_1).s(key, value);
  };
  function Companion_87() {
    this.lpb_1 = 1;
  }
  protoOf(Companion_87).aqe = function (xpp, parseFlags) {
    var tcxml = new TinCanXML();
    var activity = null;
    var evtType = xpp.l7d();
    var storeActivities = (parseFlags & this.lpb_1) === this.lpb_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).vpb_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).upb_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).tpb_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).zqd(extKey, extVal);
            }
          }
        } else {
          var tmp_9 = evtType;
          if (tmp_9 === 3) {
            if (!(xpp.k7d() == null)) {
              if (xpp.k7d() === 'activity') {
                if (!(ensureNotNull(activity).vpb_1 == null)) {
                  tcxml.npb_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_87).mpb = function (xpp, parseFlags, $super) {
    parseFlags = parseFlags === VOID ? 0 : parseFlags;
    return $super === VOID ? this.aqe(xpp, parseFlags) : $super.aqe.call(this, xpp, parseFlags);
  };
  var Companion_instance_136;
  function Companion_getInstance_104() {
    return Companion_instance_136;
  }
  function TinCanXML() {
    this.npb_1 = null;
    this.opb_1 = false;
    this.ppb_1 = null;
  }
  function Companion_88() {
    this.bqe_1 = 1000;
  }
  var Companion_instance_137;
  function Companion_getInstance_105() {
    return Companion_instance_137;
  }
  function UsernameSuggestionUseCase(filterUsernameUseCase, db) {
    this.cqe_1 = filterUsernameUseCase;
    this.dqe_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.hoi_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.entryByUri.<anonymous>' call
        if (element.loi_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.toi_1;
  }
  function requireBodyUrlForUri(_this__u8e3s4, uri) {
    return requireEntryByUri(_this__u8e3s4, uri).toi_1;
  }
  function DiTag() {
    this.eqe_1 = 13;
    this.fqe_1 = 81;
    this.gqe_1 = 1;
    this.hqe_1 = 0;
    this.iqe_1 = 32;
    this.jqe_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.sqe_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.sqe_1.uqe_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.sqe_1.yqe_1 = null;
            this.hd_1 = 2;
            suspendResult = this.sqe_1.wqe_1(tryReceiveAll(this.sqe_1.xqe_1, this.sqe_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.sqe_1, completion);
    i.tqe_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.uqe_1 = maxWaitTime;
    this.vqe_1 = coroutineScope;
    this.wqe_1 = onCollate;
    this.xqe_1 = Channel(capacity, onBufferOverflow);
    this.yqe_1 = null;
  }
  protoOf(EventCollator2).s6x = function (event) {
    this.xqe_1.w19(event);
    if (this.yqe_1 == null) {
      var tmp = this;
      tmp.yqe_1 = launch(this.vqe_1, VOID, VOID, EventCollator2$receiveEvent$slambda_0(this, null));
    }
  };
  function ExceptionWithStringResource() {
  }
  function Companion_89() {
    Companion_instance_138 = this;
    this.zqe_1 = -1;
    this.aqf_1 = new MessageIdOption2(strings_getInstance().bmm_1, this.zqe_1);
  }
  var Companion_instance_138;
  function Companion_getInstance_106() {
    if (Companion_instance_138 == null)
      new Companion_89();
    return Companion_instance_138;
  }
  function MessageIdOption2(stringResource, value) {
    Companion_getInstance_106();
    this.xq9_1 = stringResource;
    this.yq9_1 = value;
  }
  protoOf(MessageIdOption2).toString = function () {
    return 'MessageIdOption2(stringResource=' + this.xq9_1 + ', value=' + this.yq9_1 + ')';
  };
  protoOf(MessageIdOption2).hashCode = function () {
    var result = this.xq9_1.hashCode();
    result = imul(result, 31) + this.yq9_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.xq9_1.equals(tmp0_other_with_cast.xq9_1))
      return false;
    if (!(this.yq9_1 === tmp0_other_with_cast.yq9_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.bqf_1 = fieldMessageId;
    this.cqf_1 = flag;
    this.dqf_1 = order;
  }
  protoOf(SortOrderOption).toString = function () {
    return 'SortOrderOption(fieldMessageId=' + this.bqf_1 + ', flag=' + this.cqf_1 + ', order=' + this.dqf_1 + ')';
  };
  protoOf(SortOrderOption).hashCode = function () {
    var result = this.bqf_1.hashCode();
    result = imul(result, 31) + this.cqf_1 | 0;
    result = imul(result, 31) + (this.dqf_1 == null ? 0 : getBooleanHashCode(this.dqf_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.bqf_1.equals(tmp0_other_with_cast.bqf_1))
      return false;
    if (!(this.cqf_1 === tmp0_other_with_cast.cqf_1))
      return false;
    if (!(this.dqf_1 == tmp0_other_with_cast.dqf_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.apc_1 = _Char___init__impl__6a9atx(47);
    this.bpc_1 = 'file:///';
    this.cpc_1 = new Long(1073741824, 0);
    this.dpc_1 = new Long(1048576, 0);
    this.epc_1 = new Long(1024, 0);
  }
  protoOf(UMFileUtil).xpk = 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).fpc = 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).eqf = 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.eqf(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_261.fqf(item.s2()), Companion_instance_261.fqf(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_261.gqf(key)).z5(_Char___init__impl__6a9atx(61));
      var tmp = Companion_instance_261;
      var tmp_0 = ht.q(key);
      sb.y5(tmp.gqf((!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE()));
    }
    return sb.toString();
  };
  protoOf(UMFileUtil).hqf = 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).iqf = 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_90() {
    this.jqf_1 = '/#/';
  }
  protoOf(Companion_90).kqf = 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_90).lqf = function (url, divider, $super) {
    divider = divider === VOID ? '/#/' : divider;
    return $super === VOID ? this.kqf(url, divider) : $super.kqf.call(this, url, divider);
  };
  var Companion_instance_139;
  function Companion_getInstance_107() {
    return Companion_instance_139;
  }
  function UstadUrlComponents$arguments$delegate$lambda(this$0) {
    return function () {
      var parsedParams = UMFileUtil_getInstance().eqf(this$0.woo_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_261.fqf(item.s2()), Companion_instance_261.fqf(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.woo_1;
      if (charSequenceLength(this_0) === 0) {
        tmp = this$0.voo_1;
      } else {
        tmp = this$0.voo_1 + '?' + this$0.woo_1;
      }
      return tmp;
    };
  }
  function UstadUrlComponents(learningSpace, viewName, queryString) {
    this.uoo_1 = learningSpace;
    this.voo_1 = viewName;
    this.woo_1 = queryString;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.xoo_1 = lazy(tmp_0, UstadUrlComponents$arguments$delegate$lambda(this));
    var tmp_1 = this;
    tmp_1.yoo_1 = lazy_0(UstadUrlComponents$viewUri$delegate$lambda(this));
  }
  protoOf(UstadUrlComponents).mqf = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.yoo_1;
    viewUri$factory();
    return this_0.t2();
  };
  protoOf(UstadUrlComponents).nqf = function (divider) {
    return UMFileUtil_getInstance().xpk([this.uoo_1, divider, this.mqf()]);
  };
  protoOf(UstadUrlComponents).zoo = function (divider, $super) {
    var tmp;
    if (divider === VOID) {
      Companion_getInstance_97();
      tmp = '/umapp/#/';
    } else {
      tmp = divider;
    }
    divider = tmp;
    return $super === VOID ? this.nqf(divider) : $super.nqf.call(this, divider);
  };
  protoOf(UstadUrlComponents).toString = function () {
    return 'UstadUrlComponents(learningSpace=' + this.uoo_1 + ', viewName=' + this.voo_1 + ', queryString=' + this.woo_1 + ')';
  };
  protoOf(UstadUrlComponents).hashCode = function () {
    var result = getStringHashCode(this.uoo_1);
    result = imul(result, 31) + getStringHashCode(this.voo_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.woo_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.uoo_1 === tmp0_other_with_cast.uoo_1))
      return false;
    if (!(this.voo_1 === tmp0_other_with_cast.voo_1))
      return false;
    if (!(this.woo_1 === tmp0_other_with_cast.woo_1))
      return false;
    return true;
  };
  function viewUri$factory() {
    return getPropertyCallableRef('viewUri', 1, KProperty1, function (receiver) {
      return receiver.mqf();
    }, 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_81.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().cok_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.vol(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.aqb_1;
      var tmp$ret$0 = to(item.yqa_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).voc();
    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().emy_1;
      case 1:
        return strings_getInstance().fmy_1;
      case 2:
        return strings_getInstance().gmy_1;
      case 3:
        return strings_getInstance().hmy_1;
      case 4:
        return strings_getInstance().imy_1;
      case 5:
        return strings_getInstance().jmy_1;
      case 6:
        return strings_getInstance().dmy_1;
      default:
        return strings_getInstance().omj_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.nph();
    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.vol(tmp1_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp;
    var tmp_0;
    if (tmp3_elvis_lhs == null) {
      var tmp_1 = systemImpl.vol(strings_getInstance().xmj_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.wqf_1 = _this__u8e3s4;
    this.xqf_1 = endpointUrl;
    this.yqf_1 = timeout;
    this.zqf_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.aqg_1 = UMFileUtil_getInstance().xpk([this.xqf_1, 'Site', 'verify']);
            var tmp_0 = this;
            tmp_0.bqg_1 = this.wqf_1;
            var tmp_1 = this;
            tmp_1.cqg_1 = this.aqg_1;
            var tmp_2 = this;
            tmp_2.dqg_1 = this.bqg_1;
            var tmp_3 = this;
            tmp_3.eqg_1 = this.dqg_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.cqg_1);
            header(this_0, 'cache-control', 'no-cache');
            timeout(this_0, verifySite$lambda(this.yqf_1));
            tmp_4.fqg_1 = this_0;
            this.fqg_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_5 = this;
            tmp_5.gqg_1 = this.eqg_1;
            var tmp_6 = this;
            tmp_6.hqg_1 = this.fqg_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.hqg_1, this.gqg_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            var responseStr = suspendResult;
            return this.zqf_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.jqg_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().cmi(timeZoneId));
  }
  function toLocalEndOfDay(_this__u8e3s4, timeZoneId) {
    return toLocalEndOfDay_0(_this__u8e3s4, Companion_getInstance_9().cmi(timeZoneId));
  }
  function isDateOfBirthAnAdult(_this__u8e3s4) {
    return ageInYears(_this__u8e3s4) >= UstadMobileConstants_getInstance().iq6_1;
  }
  function isDateOfBirthAMinor(_this__u8e3s4) {
    return ageInYears(_this__u8e3s4) < UstadMobileConstants_getInstance().hq6_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.fmf(), Companion_getInstance_9().bmi_1).nmf();
  }
  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.zmi(), LocalTime_init_$Create$(0, 0, 0));
  }
  function toLocalEndOfDay_1(_this__u8e3s4) {
    return LocalDateTime_init_$Create$(_this__u8e3s4.zmi(), LocalTime_init_$Create$(23, 59, 59));
  }
  function chopOffSeconds(_this__u8e3s4) {
    if (_this__u8e3s4.xmi() > 0 ? true : _this__u8e3s4.ymi() > 0) {
      return LocalDateTime_init_$Create$(_this__u8e3s4.zmi(), LocalTime_init_$Create$(_this__u8e3s4.vmi(), _this__u8e3s4.wmi()));
    } else {
      return _this__u8e3s4;
    }
  }
  function chopOffSeconds_0(_this__u8e3s4) {
    if (_this__u8e3s4.xmi() > 0 ? true : _this__u8e3s4.ymi() > 0)
      return LocalTime_init_$Create$(_this__u8e3s4.vmi(), _this__u8e3s4.wmi());
    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_261.gqf(item.s2()) + '=' + Companion_instance_261.gqf(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.kqg_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_2).t1d = function (value, $completion) {
    return this.kqg_1(value, $completion);
  };
  function whenSubscribed$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.tqg_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.vqg_1 = this.tqg_1;
            var tmp_1 = this;
            tmp_1.wqg_1 = this.uqg_1;
            this.hd_1 = 1;
            var it = this.wqg_1;
            suspendResult = this.vqg_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.tqg_1, completion);
    i.uqg_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.fqh_1 = _this__u8e3s4;
    this.gqh_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.hqh_1 = this.gqh_1;
            this.hd_1 = 1;
            var tmp_1 = whenSubscribed$o$collect$slambda_0(this.hqh_1, null);
            suspendResult = this.fqh_1.iqh_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.iqh_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_1).jqh = 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.jqh(collector, $completion);
  };
  function whenSubscribed$slambda($block, resultContinuation) {
    this.sqh_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(whenSubscribed$slambda).uqh = function (active, $completion) {
    var tmp = this.vqh(active, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(whenSubscribed$slambda).he = function (p1, $completion) {
    return this.uqh((!(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.tqh_1) {
              this.hd_1 = 1;
              suspendResult = this.sqh_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).vqh = function (active, completion) {
    var i = new whenSubscribed$slambda(this.sqh_1, completion);
    i.tqh_1 = active;
    return i;
  };
  function whenSubscribed$slambda_0($block, resultContinuation) {
    var i = new whenSubscribed$slambda($block, resultContinuation);
    var l = function (active, $completion) {
      return i.uqh(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_96().lq6_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_139.lqf(link);
      learningSpaceUrl._v = urlComponents.uoo_1;
      viewUri._v = urlComponents.mqf();
    } 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.fmf(), UstadMobileConstants_getInstance().iq6_1, Companion_getInstance_10().qmg_1, Companion_getInstance_9().bmi_1).lmi();
    } 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.voc().xnv_1) : false) {
      openExternalLinkUseCase.epl(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.uqb(viewName, args, goOptions);
  }
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(function_0) {
    this.wqh_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1).fo3 = function (endpointUrl) {
    return this.wqh_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.fqi_1 = $accountName;
    this.gqi_1 = $learningSpaceUrl;
    this.hqi_1 = $accountManager;
    this.iqi_1 = $dontSetCurrentSession;
    this.jqi_1 = $this_navigateToLink;
    this.kqi_1 = $viewUri;
    this.lqi_1 = $goOptions;
    this.mqi_1 = $forceAccountSelection;
    this.nqi_1 = $maxDateOfBirth;
    this.oqi_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.fqi_1 == null) ? !(this.gqi_1._v == null) : false) {
              this.hd_1 = 9;
              continue $sm;
            } else {
              if ((!this.mqi_1 ? !isTemporary(this.hqi_1.eoc().ynw_1) : false) ? this.gqi_1._v == null ? true : this.hqi_1.voc().xnv_1 === this.gqi_1._v : false) {
                navigateToViewUri(this.jqi_1, this.kqi_1._v, this.lqi_1);
                this.hd_1 = 15;
                continue $sm;
              } else {
                if (!(this.gqi_1._v == null)) {
                  this.hd_1 = 1;
                  var tmp_0 = navigateToLink$slambda$lambda_0(this.gqi_1);
                  suspendResult = this.hqi_1.woc(this.nqi_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.sqi_1 = false;
                  this.hd_1 = 2;
                  continue $sm;
                }
              }
            }

          case 1:
            this.tqi_1 = suspendResult;
            this.sqi_1 = this.tqi_1 === 0;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.sqi_1) {
              this.rqi_1 = true;
              this.hd_1 = 5;
              continue $sm;
            } else {
              if (this.gqi_1._v == null) {
                this.hd_1 = 3;
                suspendResult = this.hqi_1.xoc(this.nqi_1, VOID, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.uqi_1 = false;
                this.hd_1 = 4;
                continue $sm;
              }
            }

          case 3:
            this.vqi_1 = suspendResult;
            this.uqi_1 = this.vqi_1 === 0;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.rqi_1 = this.uqi_1;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (this.rqi_1) {
              var tmp_1 = this;
              var this_0 = LinkedHashMap_init_$Create$();
              Companion_getInstance_117();
              this_0.s('next', this.kqi_1._v);
              Companion_getInstance_126();
              this_0.s('noSessionChange', this.iqi_1.toString());
              var tmp0_safe_receiver = this.gqi_1._v;
              if (tmp0_safe_receiver == null)
                null;
              else {
                Companion_getInstance_117();
                this_0.s('learningSpaceUrl', tmp0_safe_receiver);
              }
              tmp_1.wqi_1 = this_0.f3();
              this.xqi_1 = this.gqi_1._v;
              if (this.xqi_1 == null) {
                this.yqi_1 = null;
                this.hd_1 = 8;
                continue $sm;
              } else {
                var tmp_2 = this;
                tmp_2.zqi_1 = this.xqi_1;
                var tmp_3 = this;
                tmp_3.aqj_1 = this.zqi_1;
                var tmp_4 = this;
                var tmp0_safe_receiver_0 = this.oqi_1;
                tmp_4.bqj_1 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0(new LearningSpace(this.aqj_1));
                if (this.bqj_1 == null) {
                  this.cqj_1 = null;
                  this.hd_1 = 7;
                  continue $sm;
                } else {
                  this.hd_1 = 6;
                  suspendResult = this.bqj_1.sok(this.kqi_1._v, this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            } else {
              var this_1 = LinkedHashMap_init_$Create$();
              Companion_getInstance_117();
              this_1.s('next', this.kqi_1._v);
              Companion_getInstance_126();
              this_1.s('noSessionChange', this.iqi_1.toString());
              var tmp0_safe_receiver_1 = this.gqi_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_117();
              this_1.s('listMode', ListViewMode_PICKER_getInstance().toString());
              Companion_getInstance_117();
              this_1.s('maxDob', this.nqi_1.toString());
              var args = this_1.f3();
              this.jqi_1.uqb('AccountList', toMap_0(args), this.lqi_1);
              this.hd_1 = 15;
              continue $sm;
            }

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

            this.jqi_1.wp8(tmp_5, this.wqi_1);
            this.hd_1 = 15;
            continue $sm;
          case 9:
            this.hd_1 = 10;
            var tmp_6 = navigateToLink$slambda$lambda(this.gqi_1);
            suspendResult = this.hqi_1.foc(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.znw_1.g96_1 === substringBefore_0(this.fqi_1, '@')) {
              this.qqi_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.qqi_1 = null;
            if (false) {
              this.hd_1 = 9;
              continue $sm;
            }

            this.hd_1 = 14;
            continue $sm;
          case 14:
            var session = this.qqi_1;
            if (!(session == null)) {
              var this_2 = this.hqi_1;
              var tmp_7;
              if (!this.iqi_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.znz(session);
              }
              navigateToViewUri(this.jqi_1, this.kqi_1._v, this.lqi_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.fqi_1, this.gqi_1, this.hqi_1, this.iqi_1, this.jqi_1, this.kqi_1, this.lqi_1, this.mqi_1, this.nqi_1, this.oqi_1, completion);
    i.pqi_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.xnv_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_126();
    var tmp = to('selectedAccountPersonUid', personUid.toString());
    Companion_getInstance_126();
    return appendQueryArgs(_this__u8e3s4, mapOf([tmp, to('selectedAccountEndpointUrl', learningSpace.xnv_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.fmf() : instant;
    return gmtOffsetString(offsetAt(_this__u8e3s4, instant)) + ' ' + _this__u8e3s4.fmi();
  }
  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.iqk_1 = sgUid;
  }
  protoOf(ScopedGrantResult).toString = function () {
    return 'ScopedGrantResult(sgUid=' + this.iqk_1.toString() + ')';
  };
  protoOf(ScopedGrantResult).hashCode = function () {
    return this.iqk_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.iqk_1.equals(tmp0_other_with_cast.iqk_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.mqj_1 = _this__u8e3s4;
    this.nqj_1 = entity;
    this.oqj_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.oqj_1;
            tmp_0.pqj_1 = this_0;
            this.hd_1 = 1;
            suspendResult = this.mqj_1.d7e().insertAsync(this.pqj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qqj_1 = suspendResult;
            this.pqj_1.cga_1 = this.qqj_1;
            this.nqj_1.r96_1 = this.pqj_1.cga_1;
            this.hd_1 = 2;
            suspendResult = this.mqj_1.n7d().insertAsync(this.nqj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.rqj_1 = suspendResult;
            this.nqj_1.f96_1 = this.rqj_1;
            this.hd_1 = 3;
            suspendResult = this.mqj_1.e7e().insertAsync(PersonGroupMember_init_$Create$(this.nqj_1.f96_1, this.nqj_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.mqj_1, this.nqj_1, tmp_1, 9, this.nqj_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            return this.nqj_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.aqk_1 = _this__u8e3s4;
    this.bqk_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.aqk_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.cqk_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : null;
            this.dqk_1 = this.cqk_1;
            if (this.dqk_1 == null) {
              this.eqk_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.fqk_1 = this.dqk_1;
              var tmp_4 = this;
              tmp_4.gqk_1 = this.fqk_1;
              this.hd_1 = 1;
              suspendResult = this.bqk_1(this.gqk_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.eqk_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.hqk_1 = this.eqk_1;
            if (this.hqk_1 === true)
              return this.hqk_1;
            this.hd_1 = 3;
            suspendResult = this.bqk_1(this.aqk_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.rqk_1 = _this__u8e3s4;
    this.sqk_1 = toGroupUid;
    this.tqk_1 = permissions;
    this.uqk_1 = scopeTableId;
    this.vqk_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.rqk_1.y7e();
            var this_0 = new ScopedGrant();
            this_0.yhm_1 = this.sqk_1;
            this_0.xhm_1 = this.tqk_1;
            this_0.vhm_1 = this.uqk_1;
            this_0.whm_1 = this.vqk_1;
            suspendResult = tmp_0.bhm(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.eql_1 = _this__u8e3s4;
    this.fql_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.eql_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.gql_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : null;
            this.hql_1 = this.gql_1;
            if (this.hql_1 == null) {
              this.iql_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.jql_1 = this.hql_1;
              var tmp_4 = this;
              tmp_4.kql_1 = this.jql_1;
              this.hd_1 = 1;
              suspendResult = this.fql_1(this.kql_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.iql_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.lql_1 = this.iql_1;
            if (!(this.lql_1 == null))
              return this.lql_1;
            this.hd_1 = 3;
            suspendResult = this.fql_1(this.eql_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.lil_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.jil_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.iil_1;
    var tmp_0 = tmp & 8;
    return tmp_0 === 8;
  }
  function setIfNoValueSetYet(_this__u8e3s4, key, value) {
    if (_this__u8e3s4.ba(key) == null) {
      _this__u8e3s4.mql(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.jmj() / 3600 | 0;
    // Inline function 'kotlin.mod' call
    var r = _this__u8e3s4.jmj() % 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.tjm_1;
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fjl_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.sjm_1.zjk_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.wl6();
    while (!((_this__u8e3s4.e().equals(EventType_END_ELEMENT_getInstance()) ? _this__u8e3s4.wl6() === (initDepth - 1 | 0) : false) ? _this__u8e3s4.dc().equals(initTagName) : false)) {
      switch (_this__u8e3s4.bl7().za_1) {
        case 1:
          if (_this__u8e3s4.dc().sla() === '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.zl6()));
          break;
        default:
          break;
      }
    }
    return this_0.toString();
  }
  function emptyStringValues() {
    return new MapStringValues(emptyMap());
  }
  function Companion_91() {
  }
  protoOf(Companion_91).b4e = function () {
    return new MapStringValues(emptyMap());
  };
  protoOf(Companion_91).n4r = function () {
    return new StringValuesSerializer();
  };
  protoOf(Companion_91).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_140;
  function Companion_getInstance_108() {
    return Companion_instance_140;
  }
  function IStringValues() {
  }
  function MapStringValues(map) {
    this.jqg_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.jqg_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.jqg_1.o2();
  };
  function asIStringValues(_this__u8e3s4) {
    return new MapStringValues(_this__u8e3s4);
  }
  function StringValuesSerializer() {
    this.nql_1 = MapSerializer(serializer_0(StringCompanionObject_instance), ListSerializer(serializer_0(StringCompanionObject_instance)));
    this.oql_1 = SerialDescriptor('StringValuesSerializer', this.nql_1.q44());
  }
  protoOf(StringValuesSerializer).q44 = function () {
    return this.oql_1;
  };
  protoOf(StringValuesSerializer).s44 = function (decoder) {
    var stringMap = decoder.h48(this.nql_1);
    return new MapStringValues(stringMap);
  };
  protoOf(StringValuesSerializer).pql = function (encoder, value) {
    encoder.z49(this.nql_1, toMap_1(value));
  };
  protoOf(StringValuesSerializer).r44 = function (encoder, value) {
    return this.pql(encoder, (!(value == null) ? isInterface(value, IStringValues) : false) ? value : THROW_CCE());
  };
  function Companion_92() {
    this.qql_1 = 'errCode';
    this.rql_1 = 'msg';
    this.sql_1 = 'stacktraceKey';
    this.tql_1 = 'fromUri';
    this.uql_1 = 'ErrorReport';
  }
  var Companion_instance_141;
  function Companion_getInstance_109() {
    return Companion_instance_141;
  }
  function Companion_93() {
    this.vql_1 = 'HolidayCalendarDetail';
  }
  var Companion_instance_142;
  function Companion_getInstance_110() {
    return Companion_instance_142;
  }
  function Companion_94() {
    this.wql_1 = 'InviteViaLink';
  }
  var Companion_instance_143;
  function Companion_getInstance_111() {
    return Companion_instance_143;
  }
  function Companion_95() {
    this.xql_1 = 'LanguageDetailView';
  }
  var Companion_instance_144;
  function Companion_getInstance_112() {
    return Companion_instance_144;
  }
  function Companion_96() {
    this.yql_1 = 'LanguageEditEditView';
  }
  var Companion_instance_145;
  function Companion_getInstance_113() {
    return Companion_instance_145;
  }
  function Companion_97() {
    this.zql_1 = 'ScopedGrantDetail';
  }
  var Companion_instance_146;
  function Companion_getInstance_114() {
    return Companion_instance_146;
  }
  function Companion_98() {
    this.aqm_1 = 'SiteTermsDetailView';
    this.bqm_1 = 'SiteTermsDetailAcceptTerms';
    this.cqm_1 = 'useDisplayLocale';
    this.dqm_1 = 'showAccept';
  }
  var Companion_instance_147;
  function Companion_getInstance_115() {
    return Companion_instance_147;
  }
  function Companion_99() {
    Companion_instance_148 = this;
    this.eqm_1 = 'entity';
    this.fqm_1 = new Long(200, 0);
  }
  var Companion_instance_148;
  function Companion_getInstance_116() {
    if (Companion_instance_148 == null)
      new Companion_99();
    return Companion_instance_148;
  }
  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.iqm_1 = mode;
  }
  function ListViewMode_BROWSER_getInstance() {
    ListViewMode_initEntries();
    return ListViewMode_BROWSER_instance;
  }
  function ListViewMode_PICKER_getInstance() {
    ListViewMode_initEntries();
    return ListViewMode_PICKER_instance;
  }
  function Companion_100() {
    Companion_instance_149 = this;
    this.jqm_1 = 'clazzAction';
    this.kqm_1 = 'entityUid';
    this.lqm_1 = 'containerUid';
    this.mqm_1 = 'parentUid';
    this.nqm_1 = 'parentTitle';
    this.oqm_1 = 'entryid';
    this.pqm_1 = 'statementVerUid';
    this.qqm_1 = 'contextRegistrationIdHi';
    this.rqm_1 = 'contextRegistrationIdLo';
    this.sqm_1 = 'learnerGroupUid';
    this.tqm_1 = 'noiframe';
    this.uqm_1 = 'schoolUid';
    this.vqm_1 = 'content_type';
    this.wqm_1 = 'filterBySchoolUid';
    this.xqm_1 = 'filterByRole';
    this.yqm_1 = 'listMode';
    this.zqm_1 = 'getResultMode';
    this.aqn_1 = 'listAddMode';
    this.bqn_1 = 'filterByPermission';
    this.cqn_1 = 'clazzUid';
    this.dqn_1 = 'filterByPersonGroupUid';
    this.eqn_1 = 'filterByEnrolmentRole';
    this.fqn_1 = 'clazzAssignmentUid';
    this.gqn_1 = 'clazzAssignmentSubmitterUid';
    this.hqn_1 = 'personUid';
    this.iqn_1 = 'next';
    this.jqn_1 = 'site';
    this.kqn_1 = 'learningSpaceUrl';
    this.lqn_1 = 'openLink';
    this.mqn_1 = 'account';
    this.nqn_1 = 'accountEndpoint';
    this.oqn_1 = 'snack_message';
    this.pqn_1 = 'argCode';
    this.qqn_1 = 'argCodeTable';
    this.rqn_1 = 'argEntityName';
    this.sqn_1 = '';
    this.tqn_1 = 'root';
    this.uqn_1 = 'current';
    this.vqn_1 = 'goToComplete';
    this.wqn_1 = 'saveDb';
    this.xqn_1 = 'popUpToOnFinish';
    this.yqn_1 = 'result_dest';
    this.zqn_1 = 'result_viewname';
    this.aqo_1 = 'registration_allowed';
    this.bqo_1 = 'result_key';
    this.cqo_1 = 'intMsg';
    this.dqo_1 = 'title';
    this.eqo_1 = 'navChild';
    this.fqo_1 = 'activeTabIndex';
    this.gqo_1 = 'maxDob';
    this.hqo_1 = new Long(1, -955361223);
  }
  var Companion_instance_149;
  function Companion_getInstance_117() {
    if (Companion_instance_149 == null)
      new Companion_100();
    return Companion_instance_149;
  }
  function DetailViewModel(di, savedStateHandle, destinationName) {
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    var tmp = this;
    Companion_getInstance_117();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.dqp_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.cqr_1 = errorReport;
    this.dqr_1 = fieldsEnabled;
  }
  protoOf(ErrorReportUiState).toString = function () {
    return 'ErrorReportUiState(errorReport=' + this.cqr_1 + ', fieldsEnabled=' + this.dqr_1 + ')';
  };
  protoOf(ErrorReportUiState).hashCode = function () {
    var result = this.cqr_1 == null ? 0 : hashCode(this.cqr_1);
    result = imul(result, 31) + getBooleanHashCode(this.dqr_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.cqr_1, tmp0_other_with_cast.cqr_1))
      return false;
    if (!(this.dqr_1 === tmp0_other_with_cast.dqr_1))
      return false;
    return true;
  };
  function HolidayCalendarDetailUIState(holidayCalendar, holidayList) {
    holidayCalendar = holidayCalendar === VOID ? null : holidayCalendar;
    holidayList = holidayList === VOID ? emptyList() : holidayList;
    this.eqr_1 = holidayCalendar;
    this.fqr_1 = holidayList;
  }
  protoOf(HolidayCalendarDetailUIState).toString = function () {
    return 'HolidayCalendarDetailUIState(holidayCalendar=' + this.eqr_1 + ', holidayList=' + this.fqr_1 + ')';
  };
  protoOf(HolidayCalendarDetailUIState).hashCode = function () {
    var result = this.eqr_1 == null ? 0 : hashCode(this.eqr_1);
    result = imul(result, 31) + hashCode(this.fqr_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.eqr_1, tmp0_other_with_cast.eqr_1))
      return false;
    if (!equals(this.fqr_1, tmp0_other_with_cast.fqr_1))
      return false;
    return true;
  };
  function Companion_101() {
    this.gqr_1 = 'HolidayCalendarEdit';
  }
  var Companion_instance_150;
  function Companion_getInstance_118() {
    return Companion_instance_150;
  }
  function HolidayCalendarEditUiState(holidayCalendar, fieldsEnabled, holidayList) {
    holidayCalendar = holidayCalendar === VOID ? null : holidayCalendar;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    holidayList = holidayList === VOID ? emptyList() : holidayList;
    this.hqr_1 = holidayCalendar;
    this.iqr_1 = fieldsEnabled;
    this.jqr_1 = holidayList;
  }
  protoOf(HolidayCalendarEditUiState).toString = function () {
    return 'HolidayCalendarEditUiState(holidayCalendar=' + this.hqr_1 + ', fieldsEnabled=' + this.iqr_1 + ', holidayList=' + this.jqr_1 + ')';
  };
  protoOf(HolidayCalendarEditUiState).hashCode = function () {
    var result = this.hqr_1 == null ? 0 : hashCode(this.hqr_1);
    result = imul(result, 31) + getBooleanHashCode(this.iqr_1) | 0;
    result = imul(result, 31) + (this.jqr_1 == null ? 0 : hashCode(this.jqr_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.hqr_1, tmp0_other_with_cast.hqr_1))
      return false;
    if (!(this.iqr_1 === tmp0_other_with_cast.iqr_1))
      return false;
    if (!equals(this.jqr_1, tmp0_other_with_cast.jqr_1))
      return false;
    return true;
  };
  function Companion_102() {
    this.kqr_1 = 'HolidayCalendarList';
  }
  var Companion_instance_151;
  function Companion_getInstance_119() {
    return Companion_instance_151;
  }
  function HolidayCalendarListUiState(holidayCalendarList) {
    var tmp;
    if (holidayCalendarList === VOID) {
      // Inline function 'kotlin.collections.listOf' call
      tmp = emptyList();
    } else {
      tmp = holidayCalendarList;
    }
    holidayCalendarList = tmp;
    this.lqr_1 = holidayCalendarList;
  }
  protoOf(HolidayCalendarListUiState).toString = function () {
    return 'HolidayCalendarListUiState(holidayCalendarList=' + this.lqr_1 + ')';
  };
  protoOf(HolidayCalendarListUiState).hashCode = function () {
    return hashCode(this.lqr_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.lqr_1, tmp0_other_with_cast.lqr_1))
      return false;
    return true;
  };
  function LanguageDetailUiState(language) {
    language = language === VOID ? null : language;
    this.mqr_1 = language;
  }
  protoOf(LanguageDetailUiState).toString = function () {
    return 'LanguageDetailUiState(language=' + this.mqr_1 + ')';
  };
  protoOf(LanguageDetailUiState).hashCode = function () {
    return this.mqr_1 == null ? 0 : this.mqr_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.mqr_1, tmp0_other_with_cast.mqr_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.nqr_1 = language;
    this.oqr_1 = fieldsEnabled;
    this.pqr_1 = languageNameError;
    this.qqr_1 = twoLettersCodeError;
    this.rqr_1 = threeLettersCodeError;
  }
  protoOf(LanguageEditUiState).toString = function () {
    return 'LanguageEditUiState(language=' + this.nqr_1 + ', fieldsEnabled=' + this.oqr_1 + ', languageNameError=' + this.pqr_1 + ', twoLettersCodeError=' + this.qqr_1 + ', threeLettersCodeError=' + this.rqr_1 + ')';
  };
  protoOf(LanguageEditUiState).hashCode = function () {
    var result = this.nqr_1 == null ? 0 : this.nqr_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.oqr_1) | 0;
    result = imul(result, 31) + (this.pqr_1 == null ? 0 : getStringHashCode(this.pqr_1)) | 0;
    result = imul(result, 31) + (this.qqr_1 == null ? 0 : getStringHashCode(this.qqr_1)) | 0;
    result = imul(result, 31) + (this.rqr_1 == null ? 0 : getStringHashCode(this.rqr_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.nqr_1, tmp0_other_with_cast.nqr_1))
      return false;
    if (!(this.oqr_1 === tmp0_other_with_cast.oqr_1))
      return false;
    if (!(this.pqr_1 == tmp0_other_with_cast.pqr_1))
      return false;
    if (!(this.qqr_1 == tmp0_other_with_cast.qqr_1))
      return false;
    if (!(this.rqr_1 == tmp0_other_with_cast.rqr_1))
      return false;
    return true;
  };
  function Companion_103() {
    this.sqr_1 = 'LanguageList';
  }
  var Companion_instance_152;
  function Companion_getInstance_120() {
    return Companion_instance_152;
  }
  function LanguageListUiState(languageList, sortOptions, sortOrder) {
    languageList = languageList === VOID ? emptyList() : languageList;
    var tmp;
    if (sortOptions === VOID) {
      var tmp_0 = strings_getInstance().wml_1;
      var tmp_1 = new SortOrderOption(tmp_0, 1, true);
      var tmp_2 = strings_getInstance().wml_1;
      var tmp_3 = new SortOrderOption(tmp_2, 2, false);
      var tmp_4 = strings_getInstance().jmm_1;
      var tmp_5 = new SortOrderOption(tmp_4, 3, true);
      var tmp_6 = strings_getInstance().jmm_1;
      var tmp_7 = new SortOrderOption(tmp_6, 4, false);
      var tmp_8 = strings_getInstance().kmm_1;
      var tmp_9 = new SortOrderOption(tmp_8, 5, true);
      var tmp_10 = strings_getInstance().kmm_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.tqr_1 = languageList;
    this.uqr_1 = sortOptions;
    this.vqr_1 = sortOrder;
  }
  protoOf(LanguageListUiState).toString = function () {
    return 'LanguageListUiState(languageList=' + this.tqr_1 + ', sortOptions=' + this.uqr_1 + ', sortOrder=' + this.vqr_1 + ')';
  };
  protoOf(LanguageListUiState).hashCode = function () {
    var result = hashCode(this.tqr_1);
    result = imul(result, 31) + hashCode(this.uqr_1) | 0;
    result = imul(result, 31) + this.vqr_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.tqr_1, tmp0_other_with_cast.tqr_1))
      return false;
    if (!equals(this.uqr_1, tmp0_other_with_cast.uqr_1))
      return false;
    if (!this.vqr_1.equals(tmp0_other_with_cast.vqr_1))
      return false;
    return true;
  };
  function LeavingReasonEditViewModel$slambda$slambda($savedStateHandle, resultContinuation) {
    this.eqs_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda$slambda).gqs = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.gqs(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.fqs_1.u7d();
            Companion_getInstance_117();
            var tmp0_safe_receiver = this.eqs_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).jo1 = function (it, completion) {
    var i = new LeavingReasonEditViewModel$slambda$slambda(this.eqs_1, completion);
    i.fqs_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.gqs(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LeavingReasonEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).pqs = 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.pqs($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.pqs($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.nqt_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.LeavingReasonEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.sqt(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_104() {
    this.tqt_1 = 'LeavingReasonEdit';
  }
  var Companion_instance_153;
  function Companion_getInstance_121() {
    return Companion_instance_153;
  }
  function LeavingReasonEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.cqu_1 = this$0;
    this.dqu_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.fqu_1 = Companion_getInstance_11().n4r();
            this.hd_1 = 1;
            var tmp_0 = LeavingReasonEditViewModel$slambda$slambda_0(this.dqu_1, null);
            var tmp_1 = LeavingReasonEditViewModel$slambda$slambda_2(null);
            suspendResult = this.cqu_1.tqq(this.fqu_1, VOID, VOID, tmp_0, tmp_1, LeavingReasonEditViewModel$slambda$lambda(this.cqu_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.cqu_1.nqt_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.sqt(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.cqu_1, this.dqu_1, completion);
    i.equ_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.oqu_1 = $commitDelay;
    this.pqu_1 = $entity;
    this.qqu_1 = $this;
    this.rqu_1 = $key;
    this.squ_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.oqu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.pqu_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.qqu_1.pqq(this.qqu_1.jqp_1, this.rqu_1, this.squ_1, this.pqu_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.oqu_1, this.pqu_1, this.qqu_1, this.rqu_1, this.squ_1, completion);
    i.tqu_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.nqt_1 = MutableStateFlow(new LeavingReasonEditUiState(VOID, VOID, false));
    this.oqt_1 = asStateFlow(this.nqt_1);
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, LeavingReasonEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(LeavingReasonEditViewModel).uqu = function (leavingReason) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqt_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.LeavingReasonEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.sqt(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_126();
    var key = 'entityState';
    var tmp0_safe_receiver = this.qqv_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.aqq();
    tmp.qqv_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.pqt_1 = leavingReason;
    this.qqt_1 = reasonTitleError;
    this.rqt_1 = fieldsEnabled;
  }
  protoOf(LeavingReasonEditUiState).vqv = function (leavingReason, reasonTitleError, fieldsEnabled) {
    return new LeavingReasonEditUiState(leavingReason, reasonTitleError, fieldsEnabled);
  };
  protoOf(LeavingReasonEditUiState).sqt = function (leavingReason, reasonTitleError, fieldsEnabled, $super) {
    leavingReason = leavingReason === VOID ? this.pqt_1 : leavingReason;
    reasonTitleError = reasonTitleError === VOID ? this.qqt_1 : reasonTitleError;
    fieldsEnabled = fieldsEnabled === VOID ? this.rqt_1 : fieldsEnabled;
    return $super === VOID ? this.vqv(leavingReason, reasonTitleError, fieldsEnabled) : $super.vqv.call(this, leavingReason, reasonTitleError, fieldsEnabled);
  };
  protoOf(LeavingReasonEditUiState).toString = function () {
    return 'LeavingReasonEditUiState(leavingReason=' + this.pqt_1 + ', reasonTitleError=' + this.qqt_1 + ', fieldsEnabled=' + this.rqt_1 + ')';
  };
  protoOf(LeavingReasonEditUiState).hashCode = function () {
    var result = this.pqt_1 == null ? 0 : hashCode(this.pqt_1);
    result = imul(result, 31) + (this.qqt_1 == null ? 0 : getStringHashCode(this.qqt_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rqt_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.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;
    return true;
  };
  function Companion_105() {
    this.wqv_1 = 'ReportFilterEdit';
  }
  var Companion_instance_154;
  function Companion_getInstance_122() {
    return Companion_instance_154;
  }
  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.xqv_1 = fieldError;
    this.yqv_1 = conditionsError;
    this.zqv_1 = valuesError;
    this.aqw_1 = fieldsEnabled;
    this.bqw_1 = reportFilter;
    this.cqw_1 = uidAndLabelList;
    this.dqw_1 = createNewFilter;
    this.eqw_1 = reportFilterValueVisible;
    this.fqw_1 = reportFilterBetweenValueVisible;
    this.gqw_1 = reportFilterUidAndLabelListVisible;
  }
  protoOf(ReportFilterEditUiState).toString = function () {
    return 'ReportFilterEditUiState(fieldError=' + this.xqv_1 + ', conditionsError=' + this.yqv_1 + ', valuesError=' + this.zqv_1 + ', fieldsEnabled=' + this.aqw_1 + ', reportFilter=' + this.bqw_1 + ', uidAndLabelList=' + this.cqw_1 + ', createNewFilter=' + this.dqw_1 + ', reportFilterValueVisible=' + this.eqw_1 + ', reportFilterBetweenValueVisible=' + this.fqw_1 + ', reportFilterUidAndLabelListVisible=' + this.gqw_1 + ')';
  };
  protoOf(ReportFilterEditUiState).hashCode = function () {
    var result = this.xqv_1 == null ? 0 : getStringHashCode(this.xqv_1);
    result = imul(result, 31) + (this.yqv_1 == null ? 0 : getStringHashCode(this.yqv_1)) | 0;
    result = imul(result, 31) + (this.zqv_1 == null ? 0 : getStringHashCode(this.zqv_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.aqw_1) | 0;
    result = imul(result, 31) + (this.bqw_1 == null ? 0 : this.bqw_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.cqw_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.dqw_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.eqw_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fqw_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gqw_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.xqv_1 == tmp0_other_with_cast.xqv_1))
      return false;
    if (!(this.yqv_1 == tmp0_other_with_cast.yqv_1))
      return false;
    if (!(this.zqv_1 == tmp0_other_with_cast.zqv_1))
      return false;
    if (!(this.aqw_1 === tmp0_other_with_cast.aqw_1))
      return false;
    if (!equals(this.bqw_1, tmp0_other_with_cast.bqw_1))
      return false;
    if (!equals(this.cqw_1, tmp0_other_with_cast.cqw_1))
      return false;
    if (!(this.dqw_1 === tmp0_other_with_cast.dqw_1))
      return false;
    if (!(this.eqw_1 === tmp0_other_with_cast.eqw_1))
      return false;
    if (!(this.fqw_1 === tmp0_other_with_cast.fqw_1))
      return false;
    if (!(this.gqw_1 === tmp0_other_with_cast.gqw_1))
      return false;
    return true;
  };
  function ScopedGrantDetailUiState(entity, bitmaskList) {
    entity = entity === VOID ? null : entity;
    bitmaskList = bitmaskList === VOID ? emptyList() : bitmaskList;
    this.hqw_1 = entity;
    this.iqw_1 = bitmaskList;
  }
  protoOf(ScopedGrantDetailUiState).toString = function () {
    return 'ScopedGrantDetailUiState(entity=' + this.hqw_1 + ', bitmaskList=' + this.iqw_1 + ')';
  };
  protoOf(ScopedGrantDetailUiState).hashCode = function () {
    var result = this.hqw_1 == null ? 0 : hashCode(this.hqw_1);
    result = imul(result, 31) + hashCode(this.iqw_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.hqw_1, tmp0_other_with_cast.hqw_1))
      return false;
    if (!equals(this.iqw_1, tmp0_other_with_cast.iqw_1))
      return false;
    return true;
  };
  function Companion_106() {
    this.jqw_1 = 'ScopedGrantEdit';
    this.kqw_1 = 'grantToGroup';
    this.lqw_1 = 'grantToName';
    this.mqw_1 = 'grantTableId';
    this.nqw_1 = 'grantEntityUid';
    this.oqw_1 = 'permissionList';
  }
  var Companion_instance_155;
  function Companion_getInstance_123() {
    return Companion_instance_155;
  }
  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.pqw_1 = entity;
    this.qqw_1 = bitmaskList;
  }
  protoOf(ScopedGrantEditUiState).toString = function () {
    return 'ScopedGrantEditUiState(entity=' + this.pqw_1 + ', bitmaskList=' + this.qqw_1 + ')';
  };
  protoOf(ScopedGrantEditUiState).hashCode = function () {
    var result = this.pqw_1 == null ? 0 : hashCode(this.pqw_1);
    result = imul(result, 31) + hashCode(this.qqw_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.pqw_1, tmp0_other_with_cast.pqw_1))
      return false;
    if (!equals(this.qqw_1, tmp0_other_with_cast.qqw_1))
      return false;
    return true;
  };
  function Companion_107() {
    Companion_instance_156 = this;
    this.rqw_1 = new Long(200, 0);
    this.sqw_1 = 'initPicUri';
  }
  var Companion_instance_156;
  function Companion_getInstance_124() {
    if (Companion_instance_156 == null)
      new Companion_107();
    return Companion_instance_156;
  }
  function UstadEditViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_124();
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    this.qqv_1 = null;
    var tmp = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.rqv_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  protoOf(UstadEditViewModel).sqv = function (detailViewName, entityUid, result, detailViewExtraArgs) {
    Companion_getInstance_117();
    var popUpToViewName = this.jqp_1.ba('result_viewname');
    Companion_getInstance_117();
    var saveToKey = this.jqp_1.ba('result_key');
    Companion_getInstance_126();
    var createdNewEntity = this.jqp_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_126();
      this_0.s('entityUid', entityUid.toString());
      var tmp = this_0.f3();
      Companion_getInstance_117();
      this.lqp_1.uqb(detailViewName, tmp, new UstadGoOptions('', true));
    } else {
      this.uqv(result);
    }
  };
  protoOf(UstadEditViewModel).tqv = function (detailViewName, entityUid, result, detailViewExtraArgs, $super) {
    detailViewExtraArgs = detailViewExtraArgs === VOID ? emptyMap() : detailViewExtraArgs;
    var tmp;
    if ($super === VOID) {
      this.sqv(detailViewName, entityUid, result, detailViewExtraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.sqv.call(this, detailViewName, entityUid, result, detailViewExtraArgs);
    }
    return tmp;
  };
  protoOf(UstadEditViewModel).tqw = function (newEntityStringResource, editEntityStringResource) {
    var tmp;
    if (!this.rqv_1.equals(new Long(0, 0))) {
      tmp = true;
    } else {
      Companion_getInstance_116();
      tmp = !(this.jqp_1.ba('entity') == null);
    }
    var isEditing = tmp;
    var tmp_0 = this.jqq();
    var tmp_1;
    if (isEditing) {
      tmp_1 = editEntityStringResource;
    } else {
      tmp_1 = newEntityStringResource;
    }
    return tmp_0.vol(tmp_1);
  };
  protoOf(UstadEditViewModel).uqw = function (prevFieldValue, currentFieldValue, currentErrorMessage) {
    return currentErrorMessage == null ? null : !equals(prevFieldValue, currentFieldValue) ? null : currentErrorMessage;
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    this.fqx_1 = this$0;
    this.gqx_1 = $fabStringResource;
    this.hqx_1 = $onSetAddListItemVisibility;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).uqh = function (hasAddPermission, $completion) {
    var tmp = this.vqh(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.uqh((!(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.fqx_1, this.iqx_1, this.gqx_1, this.hqx_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).vqh = function (hasAddPermission, completion) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this.fqx_1, this.gqx_1, this.hqx_1, completion);
    i.iqx_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.uqh(hasAddPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function setAddNewItemUiState($this, hasAddPermission, fabStringResource, onSetAddItemVisibility) {
    var tmp;
    if (hasAddPermission ? $this.jqy().equals(ListViewMode_BROWSER_getInstance()) : false) {
      var tmp_0 = $this.jqq().vol(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.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.setAddNewItemUiState.<anonymous>' call
        var nextValue = prevValue.vq8(fabState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    onSetAddItemVisibility(hasAddPermission ? $this.jqy().equals(ListViewMode_PICKER_getInstance()) : false);
  }
  function Companion_108() {
    this.kqy_1 = 'listMode';
  }
  var Companion_instance_157;
  function Companion_getInstance_125() {
    return Companion_instance_157;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_3(function_0) {
    this.lqy_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_3).t1d = function (value, $completion) {
    return this.lqy_1(value, $completion);
  };
  function UstadListViewModel$searchEvtCollator$slambda(this$0, resultContinuation) {
    this.uqy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$searchEvtCollator$slambda).wqy = function (it, $completion) {
    var tmp = this.xqy(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).he = function (p1, $completion) {
    return this.wqy((!(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.vqy_1);
          this.uqy_1.yqy(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).xqy = function (it, completion) {
    var i = new UstadListViewModel$searchEvtCollator$slambda(this.uqy_1, completion);
    i.vqy_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.wqy(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.nqp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.createSearchEnabledState.<anonymous>.<anonymous>' call
          var nextValue = prevValue.vq8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.nq8_1.fq8(VOID, searchText));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      this$0.iqy_1.s6x(searchText);
      return Unit_instance;
    };
  }
  function UstadListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.zqy();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    this.iqz_1 = $hasPermissionFlow;
    this.jqz_1 = this$0;
    this.kqz_1 = $fabStringResource;
    this.lqz_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.iqz_1());
            var tmp_1 = UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda_0(this.jqz_1, this.kqz_1, this.lqz_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.iqz_1, this.jqz_1, this.kqz_1, this.lqz_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.zqy();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function UstadListViewModel(di, savedStateHandle, initialState, destinationName) {
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    this.eqy_1 = MutableStateFlow(initialState);
    this.fqy_1 = asStateFlow(this.eqy_1);
    this.gqy_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.hqy_1 = asSharedFlow(this.gqy_1);
    var tmp = this;
    var tmp_0 = new Long(200, 0);
    var tmp_1 = this.aqq();
    var tmp_2 = BufferOverflow_DROP_OLDEST_getInstance();
    tmp.iqy_1 = new EventCollator2(tmp_0, tmp_1, 1, tmp_2, UstadListViewModel$searchEvtCollator$slambda_0(this, null));
  }
  protoOf(UstadListViewModel).jqy = function () {
    var tmp;
    var tmp_0;
    Companion_getInstance_117();
    if (this.jqp_1.ba('listMode') === ListViewMode_PICKER_getInstance().iqm_1) {
      tmp_0 = true;
    } else {
      var tmp_1;
      Companion_getInstance_117();
      if (!(this.jqp_1.ba('result_viewname') == null)) {
        Companion_getInstance_117();
        tmp_1 = !(this.jqp_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).mqz = function (visible) {
    return new AppBarSearchUiState(visible, VOID, UstadListViewModel$createSearchEnabledState$lambda(this));
  };
  protoOf(UstadListViewModel).nqz = function (visible, $super) {
    visible = visible === VOID ? true : visible;
    return $super === VOID ? this.mqz(visible) : $super.mqz.call(this, visible);
  };
  protoOf(UstadListViewModel).oqz = function (hasPermissionFlow, fabStringResource, onSetAddListItemVisibility, $completion) {
    return whenSubscribed(this.eqy_1, UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda_0(hasPermissionFlow, this, fabStringResource, onSetAddListItemVisibility, null), $completion);
  };
  protoOf(UstadListViewModel).pqz = function (hasAddPermission, stringResource, onClick) {
    var tmp;
    if (hasAddPermission ? this.jqy().equals(ListViewMode_BROWSER_getInstance()) : false) {
      tmp = new FabUiState(true, this.jqq().vol(stringResource), FabIcon_ADD_getInstance(), onClick);
    } else {
      tmp = new FabUiState(false);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).qqz = 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.pqz(hasAddPermission, stringResource, onClick) : $super.pqz.call(this, hasAddPermission, stringResource, onClick);
  };
  protoOf(UstadListViewModel).rqz = function (editViewName, extraArgs) {
    var resultDest = this.kqq();
    var tmp;
    if (!(resultDest == null)) {
      Companion_getInstance_117();
      var tmp_0 = to('result_viewname', resultDest.hqc_1);
      Companion_getInstance_117();
      tmp = plus_0(mapOf([tmp_0, to('result_key', resultDest.iqc_1)]), extraArgs);
    } else {
      tmp = extraArgs;
    }
    var args = tmp;
    this.lqp_1.wp8(editViewName, args);
  };
  protoOf(UstadListViewModel).sqz = function (editViewName, extraArgs, $super) {
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.rqz(editViewName, extraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.rqz.call(this, editViewName, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).tqz = function (detailViewName, entityUid, result, extraArgs) {
    var resultDest = this.kqq();
    if (!(resultDest == null)) {
      this.uqv(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_126();
      this_0.s('entityUid', entityUid.toString());
      var tmp$ret$2 = this_0.f3();
      this.lqp_1.wp8(detailViewName, tmp$ret$2);
    }
  };
  protoOf(UstadListViewModel).uqz = function (detailViewName, entityUid, result, extraArgs, $super) {
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.tqz(detailViewName, entityUid, result, extraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.tqz.call(this, detailViewName, entityUid, result, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).vqz = function (browseStringResource, selectStringResource) {
    var tmp = this.jqq();
    var tmp_0;
    if (this.jqy().equals(ListViewMode_BROWSER_getInstance())) {
      tmp_0 = browseStringResource;
    } else {
      tmp_0 = selectStringResource;
    }
    return tmp.vol(tmp_0);
  };
  function UstadViewModel$filteredResultFlowForKey$o$collect$slambda($$this$unsafeFlow, this$0, resultContinuation) {
    this.er0_1 = $$this$unsafeFlow;
    this.fr0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).zqc = function (value, $completion) {
    var tmp = this.aqd(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.zqc(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.ir0_1 = this.er0_1;
            var tmp_1 = this;
            tmp_1.jr0_1 = this.gr0_1;
            var it = this.jr0_1;
            var isNew = it.fqc_1.c7(this.fr0_1.yqp_1) > 0;
            if (isNew) {
              _set_lastNavResultTimestampCollected__txfbew(this.fr0_1, it.fqc_1);
            }

            if (isNew) {
              this.hd_1 = 3;
              suspendResult = this.ir0_1.t1d(this.jr0_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.hr0_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).aqd = function (value, completion) {
    var i = new UstadViewModel$filteredResultFlowForKey$o$collect$slambda(this.er0_1, this.fr0_1, completion);
    i.gr0_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.zqc(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$60(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.sr0_1 = _this__u8e3s4;
    this.tr0_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.ur0_1 = this.tr0_1;
            this.hd_1 = 1;
            var tmp_1 = UstadViewModel$filteredResultFlowForKey$o$collect$slambda_0(this.ur0_1, this.sr0_1.wr0_1, null);
            suspendResult = this.sr0_1.vr0_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.yqp_1 = value;
    $this.jqp_1.mql('collectedTs', value.toString());
  }
  function Companion_109() {
    Companion_instance_158 = this;
    this.xr0_1 = 'entityState';
    this.yr0_1 = 'collectedTs';
    this.zr0_1 = 'initState';
    this.ar1_1 = 'timeZone';
    this.br1_1 = 'parentUid';
    this.cr1_1 = 'courseBlockUid';
    this.dr1_1 = 'entityUid';
    this.er1_1 = 'serverUrl';
    this.fr1_1 = 'next';
    this.gr1_1 = 'maxDob';
    var tmp = this;
    Companion_getInstance_141();
    Companion_getInstance_170();
    Companion_getInstance_191();
    Companion_getInstance_206();
    tmp.hr1_1 = listOf(['CourseListHome', 'ContentEntryListHome', 'ConversationListHome', 'PersonListHome']);
    this.ir1_1 = 'openLink';
    this.jr1_1 = 'account';
    this.kr1_1 = 'popUpToOnFinish';
    this.lr1_1 = 'inviteCode';
    this.mr1_1 = 'clazzUid';
    this.nr1_1 = 'entryid';
    this.or1_1 = 'personUid';
    this.pr1_1 = 't';
    this.qr1_1 = 'noSessionChange';
    this.rr1_1 = 'selectedAccountPersonUid';
    this.sr1_1 = 'selectedAccountEndpointUrl';
    this.tr1_1 = 'result_viewname';
    this.ur1_1 = 'result_key';
  }
  var Companion_instance_158;
  function Companion_getInstance_126() {
    if (Companion_instance_158 == null)
      new Companion_109();
    return Companion_instance_158;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_4(function_0) {
    this.vr1_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_4).t1d = function (value, $completion) {
    return this.vr1_1(value, $completion);
  };
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0(function_0) {
    this.wr1_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0).epl = function (url, target) {
    return this.wr1_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.zqp();
      // 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.lqp_1, tmp, tmp_2, tmp$ret$3);
    };
  }
  function _no_name_provided__qut3iv_2($this, this$0) {
    this.vr0_1 = $this;
    this.wr0_1 = this$0;
  }
  protoOf(_no_name_provided__qut3iv_2).pqd = 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.pqd(collector, $completion);
  };
  function UstadViewModel$getJson$slambda(this$0, $deserializer, $jsonStr, resultContinuation) {
    this.fr2_1 = this$0;
    this.gr2_1 = $deserializer;
    this.hr2_1 = $jsonStr;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$getJson$slambda).jr2 = 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.jr2((!(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.fr2_1.m4r().s45(this.gr2_1, this.hr2_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.fr2_1, this.gr2_1, this.hr2_1, completion);
    i.ir2_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.jr2($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$setJson$slambda(this$0, $serializer, $value, resultContinuation) {
    this.sr2_1 = this$0;
    this.tr2_1 = $serializer;
    this.ur2_1 = $value;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$setJson$slambda).wr2 = 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.wr2((!(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.sr2_1.m4r().r45(this.tr2_1, this.ur2_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.sr2_1, this.tr2_1, this.ur2_1, completion);
    i.vr2_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.wr2($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$launchIfHasPermission$slambda(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation) {
    this.fr3_1 = this$0;
    this.gr3_1 = $permissionCheck;
    this.hr3_1 = $block;
    this.ir3_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.lr3_1 = this.fr3_1.eqq();
            if (this.lr3_1 == null) {
              this.mr3_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = localFirstThenRepoIfFalse(this.lr3_1, this.gr3_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.mr3_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.nr3_1 = this.mr3_1;
            if (this.nr3_1 === false) {
              this.fr3_1.lqp_1.uqb('Error', emptyMap(), new UstadGoOptions(this.fr3_1.kqp_1, true));
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.hr3_1(this.jr3_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.kr3_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.fr3_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.vq8(VOID, Companion_getInstance_98().dq9_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            var tmp1_safe_receiver = this.ir3_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.fr3_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.vq8(VOID, Companion_getInstance_98().dq9_1);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp1_safe_receiver_0 = this.ir3_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.fr3_1, this.gr3_1, this.hr3_1, this.ir3_1, completion);
    i.jr3_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.wr3_1 = $onSetFieldsEnabled;
    this.xr3_1 = this$0;
    this.yr3_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.wr3_1(false);
            l$ret$1: do {
              var this_0 = this.xr3_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.vq8(VOID, Companion_getInstance_98().cq9_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.oq8_1.wq7(VOID, VOID, false));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            suspendResult = this.yr3_1(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.ar4_1 = suspendResult;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.wr3_1(true);
            l$ret$7: do {
              var this_1 = this.xr3_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.vq8(VOID, Companion_getInstance_98().dq9_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.oq8_1.wq7(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.wr3_1(true);
            l$ret$5: do {
              var this_2 = this.xr3_1.nqp_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.vq8(VOID, Companion_getInstance_98().dq9_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_1.oq8_1.wq7(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.wr3_1, this.xr3_1, this.yr3_1, completion);
    i.zr3_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.jr4_1 = _this__u8e3s4;
    this.kr4_1 = _this__u8e3s4_0;
    this.lr4_1 = key;
    this.mr4_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.nr4_1 = this.kr4_1.ba(this.lr4_1);
            if (!(this.nr4_1 == null)) {
              this.hd_1 = 1;
              var tmp_0 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_0, UstadViewModel$getJson$slambda_0(this.jr4_1, this.mr4_1, this.nr4_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.or4_1 = null;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.or4_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.or4_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.xr4_1 = _this__u8e3s4;
    this.yr4_1 = _this__u8e3s4_0;
    this.zr4_1 = key;
    this.ar5_1 = serializer;
    this.br5_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.xr4_1, this.ar5_1, this.br5_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var jsonStr = suspendResult;
            this.yr4_1.mql(this.zr4_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.kr5_1 = _this__u8e3s4;
    this.lr5_1 = serializer;
    this.mr5_1 = loadFromStateKeys;
    this.nr5_1 = savedStateKey;
    this.or5_1 = onLoadFromDb;
    this.pr5_1 = makeDefault;
    this.qr5_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.rr5_1 = this.mr5_1;
            this.sr5_1 = this.rr5_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.sr5_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.tr5_1 = this.sr5_1.e();
            var tmp_1 = this;
            tmp_1.ur5_1 = this.tr5_1;
            this.hd_1 = 2;
            suspendResult = this.kr5_1.oqq(this.kr5_1.jqp_1, this.ur5_1, this.lr5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            this.hd_1 = 1;
            continue $sm;
          case 3:
            this.wr5_1 = this.or5_1;
            if (this.wr5_1 == null) {
              this.xr5_1 = null;
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.wr5_1(this.kr5_1.dqq(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.xr5_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.yr5_1 = this.xr5_1;
            if (!(this.yr5_1 == null)) {
              this.qr5_1(this.yr5_1);
            }

            this.id_1 = 13;
            this.ar6_1 = this.kr5_1.eqq();
            if (this.ar6_1 == null) {
              this.br6_1 = null;
              this.hd_1 = 8;
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.cr6_1 = this.ar6_1;
              var tmp_3 = this;
              tmp_3.dr6_1 = this.cr6_1;
              this.er6_1 = this.or5_1;
              if (this.er6_1 == null) {
                this.fr6_1 = null;
                this.hd_1 = 7;
                continue $sm;
              } else {
                this.hd_1 = 6;
                suspendResult = this.er6_1(this.dr6_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 6:
            this.fr6_1 = suspendResult;
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.br6_1 = this.fr6_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            this.gr6_1 = this.br6_1;
            if (this.gr6_1 == null) {
              this.hd_1 = 9;
              suspendResult = this.pr5_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hr6_1 = this.gr6_1;
              this.hd_1 = 10;
              continue $sm;
            }

          case 9:
            this.hr6_1 = suspendResult;
            this.hd_1 = 10;
            continue $sm;
          case 10:
            this.ir6_1 = this.hr6_1;
            if (!(this.ir6_1 == null)) {
              this.hd_1 = 11;
              suspendResult = this.kr5_1.pqq(this.kr5_1.jqp_1, this.nr5_1, this.lr5_1, this.ir6_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.qr5_1(this.ir6_1);
            this.zr5_1 = this.ir6_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.jr6_1 = this.kd_1;
              if (!(this.yr5_1 == null)) {
                this.hd_1 = 14;
                suspendResult = this.kr5_1.pqq(this.kr5_1.jqp_1, this.nr5_1, this.lr5_1, this.yr5_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.kr6_1 = this.yr5_1;
            if (this.kr6_1 == null) {
              this.hd_1 = 16;
              suspendResult = this.pr5_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.lr6_1 = this.kr6_1;
              this.hd_1 = 17;
              continue $sm;
            }

          case 16:
            var this_0 = suspendResult;
            this.qr5_1(this_0);
            this.lr6_1 = this_0;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            this.zr5_1 = this.lr6_1;
            this.hd_1 = 18;
            continue $sm;
          case 18:
            this.id_1 = 19;
            return this.zr5_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_126();
    ViewModel_init_$Init$(this);
    this.iqp_1 = di;
    this.jqp_1 = savedStateHandle;
    this.kqp_1 = destinationName;
    this.lqp_1 = new CommandFlowUstadNavController();
    this.mqp_1 = this.lqp_1.tqb_1;
    this.nqp_1 = MutableStateFlow(new AppUiState());
    this.oqp_1 = asStateFlow(this.nqp_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.pqp_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.zqp().voc();
    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.qqp_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.zqp().voc();
    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.rqp_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.sqp_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.tqp_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.uqp_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.vqp_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.wqp_1 = Instance(this, tmp$ret$20, null).a5d(this, systemImpl$factory());
    var tmp_19 = this;
    tmp_19.xqp_1 = lazy_0(UstadViewModel$onClickLinkUseCase$delegate$lambda(this));
    var tmp_20 = this;
    var tmp0_safe_receiver = this.jqp_1.ba('collectedTs');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_20.yqp_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    if (this.yqp_1.equals(new Long(0, 0))) {
      _set_lastNavResultTimestampCollected__txfbew(this, systemTimeInMillis());
    }
  }
  protoOf(UstadViewModel).a57 = function () {
    return this.iqp_1;
  };
  protoOf(UstadViewModel).zqp = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.pqp_1;
    accountManager$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).aqq = function () {
    return get_viewModelScope(this);
  };
  protoOf(UstadViewModel).bqq = function () {
    return this.zqp().eoc().znw_1.f96_1;
  };
  protoOf(UstadViewModel).cqq = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.qqp_1;
    activeDataLayer$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).dqq = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.rqp_1;
    activeDb$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).eqq = function () {
    return this.cqq().yk3_1;
  };
  protoOf(UstadViewModel).fqq = function () {
    return this.cqq().bk4();
  };
  protoOf(UstadViewModel).gqq = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.sqp_1;
    navResultReturner$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).m4r = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.tqp_1;
    json$factory_2();
    return this_0.t2();
  };
  protoOf(UstadViewModel).hqq = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.uqp_1;
    snackDispatcher$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).iqq = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.vqp_1;
    resultReturner$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).jqq = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.wqp_1;
    systemImpl$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).kqq = function () {
    var popUpToViewName = this.jqp_1.ba('result_viewname');
    var saveToKey = this.jqp_1.ba('result_key');
    var tmp;
    if (!(popUpToViewName == null) ? !(saveToKey == null) : false) {
      tmp = new NavResultDest(popUpToViewName, saveToKey);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(UstadViewModel).lqq = function (value) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.<set-loadingState>.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, value);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(UstadViewModel).mqq = function () {
    return this.nqp_1.t2().hq8_1;
  };
  protoOf(UstadViewModel).nqq = function (_this__u8e3s4, key) {
    // Inline function 'kotlinx.coroutines.flow.filter' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = _this__u8e3s4.jqc(key);
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    return new _no_name_provided__qut3iv_2(this_0, this);
  };
  protoOf(UstadViewModel).oqq = 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).pqq = 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).vqw = 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.uqb(viewName, args, goOptions);
  };
  protoOf(UstadViewModel).uqv = function (result) {
    var resultDest = this.kqq();
    if (!(resultDest == null)) {
      this.gqq().kqc(new NavResult(resultDest.iqc_1, systemTimeInMillis(), result));
      this.lqp_1.vqb(resultDest.hqc_1, false);
    } else {
      Companion_getInstance_117();
      this.lqp_1.vqb('', true);
    }
  };
  protoOf(UstadViewModel).qqq = 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.wqq(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.wqq(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.kqp_1;
      navArgs.s(key_1, value);
    }
    if (!(currentValue == null)) {
      // Inline function 'kotlin.collections.set' call
      Companion_getInstance_116();
      var value_0 = this.m4r().r45(serializer, currentValue);
      navArgs.s('entity', value_0);
    }
    this.lqp_1.uqb(nextViewName, toMap_0(navArgs), goOptions);
  };
  protoOf(UstadViewModel).rqq = function (nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination, $super) {
    args = args === VOID ? emptyMap() : args;
    goOptions = goOptions === VOID ? Companion_getInstance_96().lq6_1 : goOptions;
    var tmp;
    if (overwriteDestination === VOID) {
      tmp = this instanceof UstadEditViewModel;
    } else {
      tmp = overwriteDestination;
    }
    overwriteDestination = tmp;
    var tmp_0;
    if ($super === VOID) {
      this.qqq(nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination);
      tmp_0 = Unit_instance;
    } else {
      tmp_0 = $super.qqq.call(this, nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination);
    }
    return tmp_0;
  };
  protoOf(UstadViewModel).sqq = 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).tqq = function (serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion, $super) {
    var tmp;
    if (loadFromStateKeys === VOID) {
      Companion_getInstance_116();
      tmp = listOf(['entityState', 'entity']);
    } else {
      tmp = loadFromStateKeys;
    }
    loadFromStateKeys = tmp;
    savedStateKey = savedStateKey === VOID ? first_0(loadFromStateKeys) : savedStateKey;
    return $super === VOID ? this.sqq(serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion) : $super.sqq.call(this, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion);
  };
  protoOf(UstadViewModel).uqq = function (permissionCheck, setLoadingState, onSetFieldsEnabled, block) {
    if (setLoadingState) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.nqp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.launchIfHasPermission.<anonymous>' call
          var nextValue = prevValue.vq8(VOID, Companion_getInstance_98().cq9_1);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (onSetFieldsEnabled == null)
      null;
    else
      onSetFieldsEnabled(false);
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, UstadViewModel$launchIfHasPermission$slambda_0(this, permissionCheck, block, onSetFieldsEnabled, null));
  };
  protoOf(UstadViewModel).vqq = function (permissionCheck, setLoadingState, onSetFieldsEnabled, block, $super) {
    setLoadingState = setLoadingState === VOID ? false : setLoadingState;
    onSetFieldsEnabled = onSetFieldsEnabled === VOID ? null : onSetFieldsEnabled;
    var tmp;
    if ($super === VOID) {
      this.uqq(permissionCheck, setLoadingState, onSetFieldsEnabled, block);
      tmp = Unit_instance;
    } else {
      tmp = $super.uqq.call(this, permissionCheck, setLoadingState, onSetFieldsEnabled, block);
    }
    return tmp;
  };
  protoOf(UstadViewModel).wqq = function (_this__u8e3s4, key) {
    putFromSavedStateIfPresent(_this__u8e3s4, this.jqp_1, key);
  };
  protoOf(UstadViewModel).xqq = 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.wqq(_this__u8e3s4, element);
    }
  };
  protoOf(UstadViewModel).wqw = function (onSetFieldsEnabled, block) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, UstadViewModel$launchWithLoadingIndicator$slambda_0(onSetFieldsEnabled, this, block, null));
  };
  protoOf(UstadViewModel).yqq = 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.zqp().eoc().znw_1;
    if (isGuestUser(it) ? true : requireAdultAccount ? !isDateOfBirthAnAdult(Companion_getInstance_6().mmi(it.o96_1)) : false) {
      var tmp_0 = this.kqp_1 + '?' + toQueryString(args);
      var tmp_1 = this.zqp();
      var tmp_2 = UstadViewModel$ifLoggedInElseNavigateToLoginWithNextDestSet$lambda;
      navigateToLink(this.lqp_1, tmp_0, tmp_1, new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0(tmp_2), new UstadGoOptions(this.kqp_1, true), VOID, ifLoggedInElseNavigateToLoginWithNextDestSet$lambda(apiUrlConfig$delegate).ko8_1);
    } else {
      block();
    }
  };
  protoOf(UstadViewModel).zqq = function (requireAdultAccount, args, block, $super) {
    requireAdultAccount = requireAdultAccount === VOID ? false : requireAdultAccount;
    var tmp;
    if ($super === VOID) {
      this.yqq(requireAdultAccount, args, block);
      tmp = Unit_instance;
    } else {
      tmp = $super.yqq.call(this, requireAdultAccount, args, block);
    }
    return tmp;
  };
  protoOf(UstadViewModel).aqr = function (contentEntryUid, clazzUid, cbUid) {
    var registrationUuid = uuid4();
    var activityId = this.zqp().voc().xnv_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.dqq());
    var tmp1_xseUid = tmp_1.n62(400122);
    var tmp2_xseAccountPersonUid = this.bqq();
    var tmp0_elvis_lhs = this.zqp().eoc().znw_1.g96_1;
    var tmp3_xseAccountUsername = tmp0_elvis_lhs == null ? 'anonymous' : tmp0_elvis_lhs;
    var tmp4_xseRootActivityUid = xxStringHasher.om8(activityId);
    var tmp5_xseRegistrationHi = registrationUuid.cmf();
    var tmp6_xseRegistrationLo = registrationUuid.dmf();
    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).bqr = function (contentEntryUid, clazzUid, cbUid, $super) {
    contentEntryUid = contentEntryUid === VOID ? new Long(0, 0) : contentEntryUid;
    var tmp;
    if (clazzUid === VOID) {
      var tmp0_safe_receiver = this.jqp_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.jqp_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.aqr(contentEntryUid, clazzUid, cbUid) : $super.aqr.call(this, contentEntryUid, clazzUid, cbUid);
  };
  function accountManager$factory() {
    return getPropertyCallableRef('accountManager', 1, KProperty1, function (receiver) {
      return receiver.zqp();
    }, null);
  }
  function activeDataLayer$factory() {
    return getPropertyCallableRef('activeDataLayer', 1, KProperty1, function (receiver) {
      return receiver.cqq();
    }, null);
  }
  function activeDb$factory() {
    return getPropertyCallableRef('activeDb', 1, KProperty1, function (receiver) {
      return receiver.dqq();
    }, null);
  }
  function navResultReturner$factory() {
    return getPropertyCallableRef('navResultReturner', 1, KProperty1, function (receiver) {
      return receiver.gqq();
    }, 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.hqq();
    }, null);
  }
  function resultReturner$factory() {
    return getPropertyCallableRef('resultReturner', 1, KProperty1, function (receiver) {
      return receiver.iqq();
    }, null);
  }
  function systemImpl$factory() {
    return getPropertyCallableRef('systemImpl', 1, KProperty1, function (receiver) {
      return receiver.jqq();
    }, null);
  }
  function accountManager$factory_0() {
    return getPropertyCallableRef('accountManager', 1, KProperty1, function (receiver) {
      return receiver.zqp();
    }, null);
  }
  function activeDataLayer$factory_0() {
    return getPropertyCallableRef('activeDataLayer', 1, KProperty1, function (receiver) {
      return receiver.cqq();
    }, null);
  }
  function activeDb$factory_0() {
    return getPropertyCallableRef('activeDb', 1, KProperty1, function (receiver) {
      return receiver.dqq();
    }, null);
  }
  function navResultReturner$factory_0() {
    return getPropertyCallableRef('navResultReturner', 1, KProperty1, function (receiver) {
      return receiver.gqq();
    }, 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.hqq();
    }, null);
  }
  function resultReturner$factory_0() {
    return getPropertyCallableRef('resultReturner', 1, KProperty1, function (receiver) {
      return receiver.iqq();
    }, null);
  }
  function systemImpl$factory_0() {
    return getPropertyCallableRef('systemImpl', 1, KProperty1, function (receiver) {
      return receiver.jqq();
    }, null);
  }
  function Companion_110() {
    this.mr6_1 = 'OpenLicenses';
  }
  var Companion_instance_159;
  function Companion_getInstance_127() {
    return Companion_instance_159;
  }
  function OpenLicensesViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'EpubContent');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.about.OpenLicensesViewModel.<anonymous>' call
        var tmp0_title = this.jqq().vol(strings_getInstance().cno_1);
        var nextValue = prevValue.vq8(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.nr6_1;
    };
  }
  function _get_supportLangConfig__jc22wi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kr7_1;
    supportLangConfig$factory_0();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lr7_1;
    setLanguageUseCase$factory_0();
    return this_0.t2();
  }
  function _get_decodeUserHandleUseCase__wbsil7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mr7_1;
    decodeUserHandleUseCase$factory_0();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nr7_1;
    apiUrlConfig$factory_2();
    return this_0.t2();
  }
  function _get_impl__d88w17($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.or7_1;
    impl$factory_0();
    return this_0.t2();
  }
  function _get_getCredentialUseCase__qofq9r($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qr7_1;
    getCredentialUseCase$factory_0();
    return this_0.t2();
  }
  function _get_parseCredentialUsernameUseCase__8m48wk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.sr7_1;
    parseCredentialUsernameUseCase$factory_0();
    return this_0.t2();
  }
  function getCredentials($this) {
    var tmp = $this.aqq();
    launch(tmp, VOID, VOID, AddAccountSelectNewOrExistingViewModel$getCredentials$slambda_0($this, null));
  }
  function onLoginWithUsernameAndPasswordFromCredentialManager($this, credentialUsername, password) {
    var tmp = $this.aqq();
    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_117();
    var tmp0_elvis_lhs = $this.jqp_1.ba('next');
    var nextDestVal = tmp0_elvis_lhs == null ? getDefaultDestinationUseCase.cph() : tmp0_elvis_lhs;
    var tmp_3 = Napier_getInstance();
    tmp_3.k5e(VOID, VOID, AddAccountSelectNewOrExistingViewModel$goToNextDestAfterSignIn$lambda(nextDestVal));
    $this.vqw($this.lqp_1, appendSelectedAccount(nextDestVal, person.f96_1, new LearningSpace(serverUrl)), new UstadGoOptions(VOID, VOID, true));
  }
  function Companion_111() {
    this.tr7_1 = 'AddAccountSelectNewOrExisting';
  }
  var Companion_instance_160;
  function Companion_getInstance_128() {
    return Companion_instance_160;
  }
  function AddAccountSelectNewOrExistingViewModel$getCredentials$slambda(this$0, resultContinuation) {
    this.cr8_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.er8_1 = _get_getCredentialUseCase__qofq9r(this.cr8_1);
            if (this.er8_1 == null) {
              this.fr8_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.er8_1.vpd(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.fr8_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.gr8_1 = this.fr8_1;
            var tmp_0 = this.gr8_1;
            if (tmp_0 instanceof PasskeyCredentialResult) {
              var tmp_1 = this;
              var tmp1_elvis_lhs = this.gr8_1.rr8_1.gpe_1.cpe_1;
              var tmp_2;
              if (tmp1_elvis_lhs == null) {
                throw IllegalStateException_init_$Create$('userHandle not found');
              } else {
                tmp_2 = tmp1_elvis_lhs;
              }
              tmp_1.hr8_1 = tmp_2;
              this.ir8_1 = _get_decodeUserHandleUseCase__wbsil7(this.cr8_1).zpb(this.hr8_1);
              this.jr8_1 = this.ir8_1.y6();
              this.hd_1 = 3;
              suspendResult = this.cr8_1.zqp().cod(this.gr8_1.rr8_1, this.jr8_1.xnv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_3 = this.gr8_1;
              if (tmp_3 instanceof PasswordCredentialResult) {
                onLoginWithUsernameAndPasswordFromCredentialManager(this.cr8_1, this.gr8_1.pr8_1, this.gr8_1.qr8_1);
                this.hd_1 = 4;
                continue $sm;
              } else {
                var tmp_4 = this.gr8_1;
                if (tmp_4 instanceof Error_2) {
                  var tmp_5 = Napier_getInstance();
                  tmp_5.s5e(VOID, VOID, AddAccountSelectNewOrExistingViewModel$getCredentials$slambda$lambda(this.gr8_1));
                  l$ret$1: do {
                    var this_0 = this.cr8_1.jr7_1;
                    while (true) {
                      var prevValue = this_0.t2();
                      var nextValue = prevValue.or8(VOID, VOID, VOID, this.gr8_1.nr6_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.gr8_1;
                  if (tmp_8 instanceof NoCredentialAvailableResult) {
                    tmp_7 = true;
                  } else {
                    var tmp_9 = this.gr8_1;
                    tmp_7 = tmp_9 instanceof UserCanceledResult_0;
                  }
                  if (tmp_7) {
                    tmp_6 = true;
                  } else {
                    tmp_6 = this.gr8_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.cr8_1, account.kl0(), this.jr8_1.xnv_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.cr8_1, completion);
    i.dr8_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.ar9_1 = this$0;
    this.br9_1 = $credentialUsername;
    this.cr9_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.er9_1 = null;
            this.fr9_1 = _get_parseCredentialUsernameUseCase__8m48wk(this.ar9_1).zpb(this.br9_1);
            this.gr9_1 = this.fr9_1.y6();
            this.hr9_1 = this.fr9_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.ar9_1.zqp();
            var this_0 = this.hr9_1;
            var tmp_1 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var this_1 = this.cr9_1;
            var tmp_2 = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
            Companion_getInstance_117();
            var tmp1_safe_receiver = this.ar9_1.jqp_1.ba('maxDob');
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : toLong_0(tmp1_safe_receiver);
            suspendResult = tmp_0.dod(tmp_1, tmp_2, this.gr9_1.xnv_1, tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, this.ar9_1.pr7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var account = suspendResult;
            var tmp_3 = this;
            goToNextDestAfterSignIn(this.ar9_1, account.kl0(), this.gr9_1.xnv_1);
            tmp_3.ir9_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.er9_1 = _get_impl__d88w17(this.ar9_1).vol(strings_getInstance().png_1);
              tmp_5.ir9_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.er9_1 = _get_impl__d88w17(this.ar9_1).vol(strings_getInstance().gmk_1);
                tmp_7.ir9_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.er9_1 = _get_impl__d88w17(this.ar9_1).vol(strings_getInstance().ong_1);
                  tmp_9.ir9_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.er9_1 = _get_impl__d88w17(this.ar9_1).vol(strings_getInstance().hmk_1);
                    tmp_11.ir9_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.ar9_1.lqq(Companion_getInstance_98().dq9_1);
            if (!(this.er9_1 == null)) {
              this.ar9_1.hqq().kq9(new Snack(toString(this.er9_1)));
            }

            throw t;
          case 5:
            throw this.kd_1;
          case 6:
            this.id_1 = 5;
            this.ar9_1.lqq(Companion_getInstance_98().dq9_1);
            if (!(this.er9_1 == null)) {
              this.ar9_1.hqq().kq9(new Snack(toString(this.er9_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.ar9_1, this.br9_1, this.cr9_1, completion);
    i.dr9_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.jr7_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.kr7_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.lr7_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.mr7_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.nr7_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.or7_1 = Instance(this, tmp$ret$8, null).a5d(this, impl$factory());
    var tmp_9 = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    tmp_9.pr7_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.qr7_1 = InstanceOrNull(this, tmp$ret$10, null).a5d(this, getCredentialUseCase$factory());
    this.rr7_1 = asStateFlow(this.jr7_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.sr7_1 = Instance(this, tmp$ret$12, null).a5d(this, parseCredentialUsernameUseCase$factory());
    if (!(savedStateHandle.ba('RefererScreen') == null)) {
      savedStateHandle.mql('RefererScreen', 'AddAccountSelectNewOrExisting');
    }
    Companion_getInstance_117();
    var nextDestination = savedStateHandle.ba('next');
    if (!(nextDestination == null)) {
      var questionIndex = indexOf(nextDestination, _Char___init__impl__6a9atx(63));
      var tmp_14;
      if (questionIndex > 0) {
        var tmp_15 = UMFileUtil_getInstance();
        // Inline function 'kotlin.text.substring' call
        // Inline function 'kotlin.js.asDynamic' call
        var tmp$ret$15 = nextDestination.substring(questionIndex);
        tmp_14 = tmp_15.parseURLQueryString(tmp$ret$15);
      } else {
        tmp_14 = emptyMap();
      }
      var args = tmp_14;
      if (args.r('childName')) {
        savedStateHandle.mql('childName', args.q('childName'));
        savedStateHandle.mql('childGender', args.q('childGender'));
        savedStateHandle.mql('childDateOfBirth', args.q('childDateOfBirth'));
        savedStateHandle.mql('ppjUId', args.q('ppjUId'));
      }
    }
    this.nqp_1.x1k(new AppUiState(VOID, VOID, VOID, false, VOID, VOID, false, VOID, VOID, VOID, true));
    var allLanguages = _get_supportLangConfig__jc22wi(this).jqa(this.jqq());
    var currentLanguage = _get_supportLangConfig__jc22wi(this).iqa(this.jqq());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.jr7_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).jr9 = function () {
    this.kr9(true);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).lr9 = function () {
    this.kr9(false);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).kr9 = function (isNewUser) {
    var tmp;
    if (isNewUser) {
      Companion_getInstance_215();
      tmp = 'new';
    } else {
      Companion_getInstance_215();
      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.xqq(this_0, Companion_getInstance_215().vr9_1);
    Companion_getInstance_126();
    this.wqq(this_0, 'next');
    Companion_getInstance_215();
    this_0.s('newOrExisting', userType);
    var tmp0_safe_receiver = _get_apiUrlConfig__mldllg_0(this).io8_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      Companion_getInstance_117();
      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).io8_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).jo8_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.lqp_1.wp8(destination, args);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).xr9 = function (uiLanguage) {
    if (!uiLanguage.equals(this.jr7_1.t2().kr8_1)) {
      var result = _get_setLanguageUseCase__st7nci(this).spk(uiLanguage, 'AddAccountSelectNewOrExisting', this.lqp_1);
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.jr7_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectneworexisting.AddAccountSelectNewOrExistingViewModel.onLanguageSelected.<anonymous>' call
          var nextValue = prevValue.or8(uiLanguage, VOID, result.qpk_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.kr8_1 = currentLanguage;
    this.lr8_1 = languageList;
    this.mr8_1 = showWaitForRestart;
    this.nr8_1 = errorText;
  }
  protoOf(AddAccountSelectNewOrExistingUiState).yr9 = function (currentLanguage, languageList, showWaitForRestart, errorText) {
    return new AddAccountSelectNewOrExistingUiState(currentLanguage, languageList, showWaitForRestart, errorText);
  };
  protoOf(AddAccountSelectNewOrExistingUiState).or8 = function (currentLanguage, languageList, showWaitForRestart, errorText, $super) {
    currentLanguage = currentLanguage === VOID ? this.kr8_1 : currentLanguage;
    languageList = languageList === VOID ? this.lr8_1 : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? this.mr8_1 : showWaitForRestart;
    errorText = errorText === VOID ? this.nr8_1 : errorText;
    return $super === VOID ? this.yr9(currentLanguage, languageList, showWaitForRestart, errorText) : $super.yr9.call(this, currentLanguage, languageList, showWaitForRestart, errorText);
  };
  protoOf(AddAccountSelectNewOrExistingUiState).toString = function () {
    return 'AddAccountSelectNewOrExistingUiState(currentLanguage=' + this.kr8_1 + ', languageList=' + this.lr8_1 + ', showWaitForRestart=' + this.mr8_1 + ', errorText=' + this.nr8_1 + ')';
  };
  protoOf(AddAccountSelectNewOrExistingUiState).hashCode = function () {
    var result = this.kr8_1.hashCode();
    result = imul(result, 31) + hashCode(this.lr8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mr8_1) | 0;
    result = imul(result, 31) + (this.nr8_1 == null ? 0 : getStringHashCode(this.nr8_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.kr8_1.equals(tmp0_other_with_cast.kr8_1))
      return false;
    if (!equals(this.lr8_1, tmp0_other_with_cast.lr8_1))
      return false;
    if (!(this.mr8_1 === tmp0_other_with_cast.mr8_1))
      return false;
    if (!(this.nr8_1 == tmp0_other_with_cast.nr8_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.ura_1;
    apiUrlConfig$factory_4();
    return this_0.t2();
  }
  function Companion_112() {
    this.yra_1 = 'AddAccountSelectUserType';
  }
  var Companion_instance_161;
  function Companion_getInstance_129() {
    return Companion_instance_161;
  }
  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.ura_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_3());
    this.vra_1 = MutableStateFlow(new AddAccountSelectNewOrExistingUserTypeUiState());
    var tmp_1 = this;
    Companion_getInstance_215();
    var tmp_2 = savedStateHandle.ba('newOrExisting');
    Companion_getInstance_215();
    tmp_1.wra_1 = tmp_2 === 'new';
    this.xra_1 = _get_apiUrlConfig__mldllg_1(this).jo8_1;
    var tmp_3;
    if (this.wra_1) {
      tmp_3 = this.jqq().vol(strings_getInstance().knr_1);
    } else {
      tmp_3 = this.jqq().vol(strings_getInstance().lnr_1);
    }
    var tmp0_title = tmp_3;
    this.nqp_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.vra_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectusertype.AddAccountSelectNewOrExistingUserTypeViewModel.<anonymous>' call
        var nextValue = prevValue.p6s(!(this.xra_1 == null));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).arb = function () {
    return asStateFlow(this.vra_1);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).brb = function () {
    var tmp;
    Companion_getInstance_215();
    var tmp_0 = this.jqp_1.ba('newOrExisting');
    Companion_getInstance_215();
    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.xqq(this_0, Companion_getInstance_215().vr9_1);
    Companion_getInstance_215();
    this_0.s('personalAccount', 'true');
    Companion_getInstance_117();
    var tmp0_elvis_lhs = this.xra_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.lqp_1.wp8(tmp_1, tmp$ret$2);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).crb = 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.xqq(this_0, Companion_getInstance_215().vr9_1);
    var tmp$ret$2 = this_0.f3();
    this.lqp_1.wp8('LearningSpaceList', tmp$ret$2);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).drb = function () {
  };
  function AddAccountSelectNewOrExistingUserTypeUiState(showAddPersonalAccount) {
    showAddPersonalAccount = showAddPersonalAccount === VOID ? false : showAddPersonalAccount;
    this.zra_1 = showAddPersonalAccount;
  }
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).p6s = function (showAddPersonalAccount) {
    return new AddAccountSelectNewOrExistingUserTypeUiState(showAddPersonalAccount);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).toString = function () {
    return 'AddAccountSelectNewOrExistingUserTypeUiState(showAddPersonalAccount=' + this.zra_1 + ')';
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).hashCode = function () {
    return getBooleanHashCode(this.zra_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.zra_1 === tmp0_other_with_cast.zra_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.mrb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda).lo0 = function (it, $completion) {
    var tmp = this.mo0(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.lo0(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.mrb_1.prc_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.drd(this.nrb_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).mo0 = function (it, completion) {
    var i = new AccountListViewModel$slambda$slambda(this.mrb_1, completion);
    i.nrb_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.lo0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.mrd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda$slambda).ord = function (accountList, $completion) {
    var tmp = this.prd(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.ord((!(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.mrd_1.zqp().eoc().ynw_1.wik_1;
          var this_0 = this.nrd_1;
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_0.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            var isFilteredOutActiveAccount = this.mrd_1.lrc_1 === 'header' ? element.ynw_1.wik_1.equals(currentUserSessionUid) : false;
            var isFilteredOutByEndpoint = !(this.mrd_1.krc_1 == null) ? !(element.anx_1.xnv_1 === this.mrd_1.krc_1) : false;
            var isFilteredOutByDateOfBirth = this.mrd_1.mrc_1.c7(new Long(0, 0)) > 0 ? element.znw_1.o96_1.c7(this.mrd_1.mrc_1) > 0 : false;
            if (!(((isFilteredOutActiveAccount ? true : isFilteredOutByEndpoint) ? true : isFilteredOutByDateOfBirth) ? true : isTemporary(element.ynw_1))) {
              destination.i1(element);
            }
          }
          var accountsToDisplay = destination;
          l$ret$1: do {
            var this_1 = this.mrd_1.prc_1;
            while (true) {
              var prevValue = this_1.t2();
              var nextValue = prevValue.drd(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).prd = function (accountList, completion) {
    var i = new AccountListViewModel$slambda$slambda$slambda(this.mrd_1, completion);
    i.nrd_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.ord(accountList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.yrd_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.yrd_1.zqp().uoc();
            var tmp_1 = AccountListViewModel$slambda$slambda$slambda_0(this.yrd_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.yrd_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.nrc_1;
    apiUrlConfig$factory_6();
    return this_0.t2();
  }
  function _get_shareAppUseCase__louoas($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.orc_1;
    shareAppUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rrc_1;
    getVersionUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchOpenLicensesUseCase__f5qz1z($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.src_1;
    launchOpenLicensesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getShowPoweredByUseCase__5l0p0e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.trc_1;
    getShowPoweredByUseCase$factory_0();
    return this_0.t2();
  }
  function getChildDetail($this, $completion) {
    var tmp = new $getChildDetailCOROUTINE$61($this, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function navigateToConsentManagementScreen($this) {
    var tmp = $this.aqq();
    launch(tmp, VOID, VOID, AccountListViewModel$navigateToConsentManagementScreen$slambda_0($this, null));
  }
  function Companion_113() {
    this.ore_1 = 'AccountList';
    this.pre_1 = 'filterByLearningSpace';
    this.qre_1 = 'activeAccountMode';
    this.rre_1 = 'header';
    this.sre_1 = 'inlist';
  }
  var Companion_instance_162;
  function Companion_getInstance_130() {
    return Companion_instance_162;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_5(function_0) {
    this.tre_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_5).t1d = function (value, $completion) {
    return this.tre_1(value, $completion);
  };
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0(function_0) {
    this.ure_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0).epl = function (url, target) {
    return this.ure_1(url, target);
  };
  function AccountListViewModel$slambda(this$0, resultContinuation) {
    this.drf_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.drf_1.zqp().soc();
            var tmp_1 = AccountListViewModel$slambda$slambda_0(this.drf_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.drf_1, completion);
    i.erf_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.nrf_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.nrf_1.prc_1, AccountListViewModel$slambda$slambda_2(this.nrf_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.nrf_1, completion);
    i.orf_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.xrf_1 = this$0;
    this.yrf_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.xrf_1.zqp().bod(this.yrf_1, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_$receiver = this.xrf_1.lqp_1;
            Companion_getInstance_141();
            var tmp1_link = 'CourseListHome';
            var tmp2_accountManager = this.xrf_1.zqp();
            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.xrf_1).ko8_1;
            var tmp5_goOptions = new UstadGoOptions(VOID, VOID, true);
            var tmp6_presetLearningSpaceUrl = _get_apiUrlConfig__mldllg_2(this.xrf_1).io8_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.xrf_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.xrf_1, this.yrf_1, completion);
    i.zrf_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.irg_1 = this$0;
    this.jrg_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.irg_1.urc_1 == null)) {
              this.hd_1 = 1;
              suspendResult = this.irg_1.urc_1.v7e().qho(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.lrg_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.chp_1;
            this.lrg_1 = ARGUMENT === false;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.lrg_1) {
              this.irg_1.jqp_1.mql('RefererScreen', 'AccountList');
              var this_0 = LinkedHashMap_init_$Create$();
              this.irg_1.xqq(this_0, Companion_getInstance_215().vr9_1);
              Companion_getInstance_215();
              this_0.s('newOrExisting', 'existing');
              Companion_getInstance_117();
              this_0.s('learningSpaceUrl', toString_0(_get_apiUrlConfig__mldllg_2(this.irg_1).io8_1));
              var arg = this_0.f3();
              this.irg_1.lqp_1.wp8('Login', arg);
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.irg_1.lqp_1.wp8('AddAccountSelectNewOrExisting', this.jrg_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.irg_1, this.jrg_1, completion);
    i.krg_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$onClickAccount$slambda(this$0, $sessionWithPersonAndLearningSpace, resultContinuation) {
    this.urg_1 = this$0;
    this.vrg_1 = $sessionWithPersonAndLearningSpace;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickAccount$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$onClickAccount$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickAccount$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.urg_1.jqp_1.ba('childName') == null)) {
              if (this.vrg_1.znw_1.n96_1) {
                this.hd_1 = 2;
                suspendResult = getChildDetail(this.urg_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                navigateToConsentManagementScreen(this.urg_1);
                this.hd_1 = 3;
                continue $sm;
              }
            } else {
              this.hd_1 = 1;
              continue $sm;
            }

          case 1:
            var tmp_0;
            if (this.vrg_1.znw_1.n96_1) {
              Companion_getInstance_170();
              tmp_0 = 'ContentEntryListHome';
            } else {
              Companion_getInstance_141();
              tmp_0 = 'CourseListHome';
            }

            var viewName = tmp_0;
            var tmp5_$this = this.urg_1.jrc_1;
            var tmp6_navController = this.urg_1.lqp_1;
            Companion_getInstance_126();
            var tmp4_elvis_lhs = this.urg_1.jqp_1.ba('next');
            var tmp7_nextDest = tmp4_elvis_lhs == null ? viewName : tmp4_elvis_lhs;
            var tmp8_dontSetCurrentSession = this.urg_1.vrc_1;
            tmp5_$this.wpq(this.vrg_1, tmp7_nextDest, tmp6_navController, VOID, tmp8_dontSetCurrentSession);
            return Unit_instance;
          case 2:
            var person = suspendResult;
            var tmp0_nextViewName = 'EditChildProfile';
            var tmp2_serializer = Companion_instance_3.n4r();
            var tmp_1 = to('ppjUId', toString_0(this.urg_1.jqp_1.ba('ppjUId')));
            Companion_getInstance_116();
            Companion_getInstance_116();
            var tmp3_args = mapOf([tmp_1, to('entity', toString_0(this.urg_1.jqp_1.ba('entity')))]);
            this.urg_1.rqq(tmp0_nextViewName, 'person', person, tmp2_serializer, tmp3_args);
            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$onClickAccount$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickAccount$slambda(this.urg_1, this.vrg_1, completion);
    i.wrg_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$onClickAccount$slambda_0(this$0, $sessionWithPersonAndLearningSpace, resultContinuation) {
    var i = new AccountListViewModel$onClickAccount$slambda(this$0, $sessionWithPersonAndLearningSpace, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$navigateToConsentManagementScreen$slambda(this$0, resultContinuation) {
    this.frh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$navigateToConsentManagementScreen$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$navigateToConsentManagementScreen$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$navigateToConsentManagementScreen$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.frh_1.jqp_1.ba('ppjUId');
          var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
          var ppjUid = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
          Companion_getInstance_126();
          var tmp_0 = to('entityUid', ppjUid.toString());
          Companion_getInstance_126();
          Companion_getInstance_117();
          this.frh_1.lqp_1.wp8('ParentalConsentManagement', mapOf([tmp_0, to('next', '')]));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AccountListViewModel$navigateToConsentManagementScreen$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$navigateToConsentManagementScreen$slambda(this.frh_1, completion);
    i.grh_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$navigateToConsentManagementScreen$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$navigateToConsentManagementScreen$slambda(this$0, 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.prh_1 = this$0;
    this.qrh_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.prh_1.zqp().bod(this.qrh_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.prh_1, this.qrh_1, completion);
    i.rrh_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.ari_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.ari_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.ari_1, completion);
    i.bri_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 $getChildDetailCOROUTINE$61(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.hre_1 = _this__u8e3s4;
  }
  protoOf($getChildDetailCOROUTINE$61).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.ire_1 = this.hre_1.jqp_1.ba('childName');
            var tmp_1 = this;
            var tmp0_safe_receiver = this.hre_1.jqp_1.ba('childGender');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
            tmp_1.jre_1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
            var tmp_2 = this;
            var tmp2_safe_receiver = this.hre_1.jqp_1.ba('childDateOfBirth');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
            tmp_2.kre_1 = tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
            this.lre_1 = toFirstAndLastNameExt(this.ire_1);
            this.mre_1 = this.lre_1.y6();
            this.nre_1 = this.lre_1.z6();
            this.hd_1 = 1;
            var tmp_3 = get_doorPrimaryKeyManager(this.hre_1.dqq());
            suspendResult = tmp_3.o62(9, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var uid = suspendResult;
            return new Person(uid, VOID, this.mre_1, this.nre_1, VOID, VOID, this.jre_1, VOID, true, this.kre_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 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.jrc_1 = startUserSessionUseCase;
    this.krc_1 = savedStateHandle.ba('filterByLearningSpace');
    var tmp_2 = this;
    var tmp0_elvis_lhs = savedStateHandle.ba('activeAccountMode');
    tmp_2.lrc_1 = tmp0_elvis_lhs == null ? 'header' : tmp0_elvis_lhs;
    var tmp_3 = this;
    Companion_getInstance_117();
    var tmp0_safe_receiver = savedStateHandle.ba('maxDob');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.mrc_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.nrc_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.orc_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(this, shareAppUseCase$factory());
    this.prc_1 = MutableStateFlow(new AccountListUiState(VOID, VOID, _get_apiUrlConfig__mldllg_2(this).ko8_1, VOID, VOID, !(_get_shareAppUseCase__louoas(this) == null)));
    this.qrc_1 = asStateFlow(this.prc_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.rrc_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.src_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.trc_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).io8_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).yk3_1;
    }
    tmp_14.urc_1 = tmp_15;
    var tmp_20 = this;
    Companion_getInstance_126();
    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.vrc_1 = tmp1_elvis_lhs_0 == null ? false : tmp1_elvis_lhs_0;
    Companion_getInstance_117();
    var nextDestination = savedStateHandle.ba('next');
    if (!(nextDestination == null)) {
      var questionIndex = indexOf(nextDestination, _Char___init__impl__6a9atx(63));
      var tmp_21;
      if (questionIndex > 0) {
        var tmp_22 = UMFileUtil_getInstance();
        // Inline function 'kotlin.text.substring' call
        // Inline function 'kotlin.js.asDynamic' call
        var tmp$ret$20 = nextDestination.substring(questionIndex);
        tmp_21 = tmp_22.parseURLQueryString(tmp$ret$20);
      } else {
        tmp_21 = emptyMap();
      }
      var args = tmp_21;
      if (args.r('childName')) {
        savedStateHandle.mql('childName', args.q('childName'));
        savedStateHandle.mql('childGender', args.q('childGender'));
        savedStateHandle.mql('childDateOfBirth', args.q('childDateOfBirth'));
        savedStateHandle.mql('ppjUId', args.q('ppjUId'));
      }
    }
    var tmp_23;
    if (savedStateHandle.ba('listMode') === ListViewMode_PICKER_getInstance().iqm_1) {
      tmp_23 = this.jqq().vol(strings_getInstance().anc_1);
    } else {
      tmp_23 = this.jqq().vol(strings_getInstance().emn_1);
    }
    var tmp0_title = tmp_23;
    this.nqp_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.prc_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.cph();
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.aph_1;
        var tmp_24 = 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.cph();
        var nextValue = prevValue.drd(VOID, VOID, VOID, tmp_24, 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.aqq();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_25;
    // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.<anonymous>' call
    if (this.lrc_1 === 'header') {
      tmp_25 = this_1;
    } else {
      tmp_25 = null;
    }
    var tmp1_safe_receiver_0 = tmp_25;
    if (tmp1_safe_receiver_0 == null)
      null;
    else {
      launch(tmp1_safe_receiver_0, VOID, VOID, AccountListViewModel$slambda_0(this, null));
    }
    var tmp_26 = this.aqq();
    launch(tmp_26, VOID, VOID, AccountListViewModel$slambda_2(this, null));
  }
  protoOf(AccountListViewModel).cri = function () {
    var tmp0_elvis_lhs = this.prc_1.t2().wrc_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var currentSession = tmp;
    var tmp_0 = this.aqq();
    launch(tmp_0, VOID, VOID, AccountListViewModel$onClickLogout$slambda_0(this, currentSession, null));
  };
  protoOf(AccountListViewModel).dri = function () {
    var tmp0_safe_receiver = this.prc_1.t2().wrc_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.znw_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_126();
    this.lqp_1.wp8('PersonDetailView', mapOf_0(to('entityUid', personUid.toString())));
  };
  protoOf(AccountListViewModel).eri = 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.krc_1 == null)) {
      Companion_getInstance_126();
      this_0.s('serverUrl', this.krc_1);
    }
    Companion_getInstance_126();
    Companion_getInstance_126();
    this.xqq(this_0, listOf(['next', 'noSessionChange']));
    this_0.s('RefererScreen', 'AccountList');
    Companion_getInstance_126();
    Companion_getInstance_126();
    var tmp0_elvis_lhs = this.jqp_1.ba('maxDob');
    this_0.s('maxDob', tmp0_elvis_lhs == null ? '0' : tmp0_elvis_lhs);
    var args = this_0.f3();
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, AccountListViewModel$onClickAddAccount$slambda_0(this, args, null));
  };
  protoOf(AccountListViewModel).fri = function (sessionWithPersonAndLearningSpace) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, AccountListViewModel$onClickAccount$slambda_0(this, sessionWithPersonAndLearningSpace, null));
  };
  protoOf(AccountListViewModel).gri = function (session) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, AccountListViewModel$onClickDeleteAccount$slambda_0(this, session, null));
  };
  protoOf(AccountListViewModel).hri = function () {
    var launchUseCaseVal = _get_launchOpenLicensesUseCase__f5qz1z(this);
    if (!(launchUseCaseVal == null)) {
      var tmp = this.aqq();
      launch(tmp, VOID, VOID, AccountListViewModel$onClickOpenLicenses$slambda_0(launchUseCaseVal, null));
    } else {
      this.lqp_1.wp8('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.wrc_1 = headerAccount;
    this.xrc_1 = accountsList;
    this.yrc_1 = showAccountEndpoint;
    this.zrc_1 = version;
    this.ard_1 = showPoweredBy;
    this.brd_1 = shareAppOptionVisible;
    this.crd_1 = shareAppBottomSheetVisible;
  }
  protoOf(AccountListUiState).iri = function () {
    return !(this.wrc_1 == null) ? !this.wrc_1.znw_1.f96_1.equals(new Long(0, 0)) : false;
  };
  protoOf(AccountListUiState).jri = function () {
    return !(this.wrc_1 == null) ? !isGuestUser(this.wrc_1.znw_1) : false;
  };
  protoOf(AccountListUiState).kri = function (headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) {
    return new AccountListUiState(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible);
  };
  protoOf(AccountListUiState).drd = function (headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible, $super) {
    headerAccount = headerAccount === VOID ? this.wrc_1 : headerAccount;
    accountsList = accountsList === VOID ? this.xrc_1 : accountsList;
    showAccountEndpoint = showAccountEndpoint === VOID ? this.yrc_1 : showAccountEndpoint;
    version = version === VOID ? this.zrc_1 : version;
    showPoweredBy = showPoweredBy === VOID ? this.ard_1 : showPoweredBy;
    shareAppOptionVisible = shareAppOptionVisible === VOID ? this.brd_1 : shareAppOptionVisible;
    shareAppBottomSheetVisible = shareAppBottomSheetVisible === VOID ? this.crd_1 : shareAppBottomSheetVisible;
    return $super === VOID ? this.kri(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) : $super.kri.call(this, headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible);
  };
  protoOf(AccountListUiState).toString = function () {
    return 'AccountListUiState(headerAccount=' + this.wrc_1 + ', accountsList=' + this.xrc_1 + ', showAccountEndpoint=' + this.yrc_1 + ', version=' + this.zrc_1 + ', showPoweredBy=' + this.ard_1 + ', shareAppOptionVisible=' + this.brd_1 + ', shareAppBottomSheetVisible=' + this.crd_1 + ')';
  };
  protoOf(AccountListUiState).hashCode = function () {
    var result = this.wrc_1 == null ? 0 : this.wrc_1.hashCode();
    result = imul(result, 31) + hashCode(this.xrc_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.yrc_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.zrc_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ard_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.brd_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.crd_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.wrc_1, tmp0_other_with_cast.wrc_1))
      return false;
    if (!equals(this.xrc_1, tmp0_other_with_cast.xrc_1))
      return false;
    if (!(this.yrc_1 === tmp0_other_with_cast.yrc_1))
      return false;
    if (!(this.zrc_1 === tmp0_other_with_cast.zrc_1))
      return false;
    if (!(this.ard_1 === tmp0_other_with_cast.ard_1))
      return false;
    if (!(this.brd_1 === tmp0_other_with_cast.brd_1))
      return false;
    if (!(this.crd_1 === tmp0_other_with_cast.crd_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.aqq();
    // 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.lri_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_6).t1d = function (value, $completion) {
    return this.lri_1(value, $completion);
  };
  function launchSetTitleFromClazzUid$slambda$slambda($updateUi, resultContinuation) {
    this.uri_1 = $updateUi;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).wri = function (it, $completion) {
    var tmp = this.xri(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).he = function (p1, $completion) {
    return this.wri((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.uri_1(this.vri_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).xri = function (it, completion) {
    var i = new launchSetTitleFromClazzUid$slambda$slambda(this.uri_1, completion);
    i.vri_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.wri(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function launchSetTitleFromClazzUid$slambda($clazzUid, $dataLayer$delegate, $updateUi, resultContinuation) {
    this.grj_1 = $clazzUid;
    this.hrj_1 = $dataLayer$delegate;
    this.irj_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.hrj_1).bk4().o7d().z8c(this.grj_1);
            var tmp_1 = launchSetTitleFromClazzUid$slambda$slambda_0(this.irj_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.grj_1, this.hrj_1, this.irj_1, completion);
    i.jrj_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.wqa_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.krj_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_7).t1d = function (value, $completion) {
    return this.krj_1(value, $completion);
  };
  function collectClazzNameAndUpdateTitle$slambda($appUiState, resultContinuation) {
    this.trj_1 = $appUiState;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(collectClazzNameAndUpdateTitle$slambda).wri = function (clazzTitle, $completion) {
    var tmp = this.xri(clazzTitle, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).he = function (p1, $completion) {
    return this.wri((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.trj_1;
          var tmp_0;
          if (!(this.trj_1.t2().iq8_1 == this.urj_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.vq8(VOID, VOID, this.urj_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).xri = function (clazzTitle, completion) {
    var i = new collectClazzNameAndUpdateTitle$slambda(this.trj_1, completion);
    i.urj_1 = clazzTitle;
    return i;
  };
  function collectClazzNameAndUpdateTitle$slambda_0($appUiState, resultContinuation) {
    var i = new collectClazzNameAndUpdateTitle$slambda($appUiState, resultContinuation);
    var l = function (clazzTitle, $completion) {
      return i.wri(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().cn4_1;
    } else {
      if (tmp0_subject === 104) {
        tmp = strings_getInstance().pn5_1;
      } else {
        if (tmp0_subject === 100) {
          tmp = strings_getInstance().sni_1;
        } else {
          if (tmp0_subject === 103) {
            tmp = strings_getInstance().cn5_1;
          } else {
            if (tmp0_subject === 105) {
              tmp = strings_getInstance().xni_1;
            } else {
              tmp = strings_getInstance().omj_1;
            }
          }
        }
      }
    }
    return tmp;
  }
  function CoursePermissionConstants() {
    CoursePermissionConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().vno_1;
    PermissionFlags_getInstance();
    var tmp_1 = to(tmp_0, new Long(1, 0));
    var tmp_2 = strings_getInstance().bnp_1;
    PermissionFlags_getInstance();
    var tmp_3 = to(tmp_2, new Long(8192, 0));
    var tmp_4 = strings_getInstance().snk_1;
    PermissionFlags_getInstance();
    var tmp_5 = to(tmp_4, new Long(2, 0));
    var tmp_6 = strings_getInstance().wno_1;
    PermissionFlags_getInstance();
    var tmp_7 = to(tmp_6, new Long(4, 0));
    var tmp_8 = strings_getInstance().xno_1;
    PermissionFlags_getInstance();
    var tmp_9 = to(tmp_8, new Long(8, 0));
    var tmp_10 = strings_getInstance().yno_1;
    PermissionFlags_getInstance();
    var tmp_11 = to(tmp_10, new Long(16, 0));
    var tmp_12 = strings_getInstance().nn3_1;
    PermissionFlags_getInstance();
    var tmp_13 = to(tmp_12, new Long(32, 0));
    var tmp_14 = strings_getInstance().pn3_1;
    PermissionFlags_getInstance();
    var tmp_15 = to(tmp_14, new Long(64, 0));
    var tmp_16 = strings_getInstance().zno_1;
    PermissionFlags_getInstance();
    var tmp_17 = to(tmp_16, new Long(128, 0));
    var tmp_18 = strings_getInstance().anp_1;
    PermissionFlags_getInstance();
    tmp.vrj_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$62(_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().zmm_1;
    } else {
      if (tmp0_subject === 1001) {
        tmp = strings_getInstance().en0_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function getTitleForCoursePermission$slambda($entity, resultContinuation) {
    this.rrk_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(getTitleForCoursePermission$slambda).trk = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(getTitleForCoursePermission$slambda).he = function (p1, $completion) {
    return this.trk(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.srk_1.q7d().ge7(this.rrk_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).jo1 = function (it, completion) {
    var i = new getTitleForCoursePermission$slambda(this.rrk_1, completion);
    i.srk_1 = it;
    return i;
  };
  function getTitleForCoursePermission$slambda_0($entity, resultContinuation) {
    var i = new getTitleForCoursePermission$slambda($entity, resultContinuation);
    var l = function (it, $completion) {
      return i.trk(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function getTitleForCoursePermission$slambda_1($entity, resultContinuation) {
    this.crl_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(getTitleForCoursePermission$slambda_1).erl = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(getTitleForCoursePermission$slambda_1).he = function (p1, $completion) {
    return this.erl(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.drl_1.n7d();
            var tmp0_safe_receiver = this.crl_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).jo1 = function (it, completion) {
    var i = new getTitleForCoursePermission$slambda_1(this.crl_1, completion);
    i.drl_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.erl(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $getTitleForCoursePermissionCOROUTINE$62(_this__u8e3s4, entity, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.erk_1 = _this__u8e3s4;
    this.frk_1 = entity;
  }
  protoOf($getTitleForCoursePermissionCOROUTINE$62).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.erk_1.a57()).f58();
            var tmp_2 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
            tmp_0.grk_1 = tmp_1.d58(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            var tmp0_safe_receiver = this.frk_1;
            tmp_3.hrk_1 = tmp0_safe_receiver == null ? null : titleStringResource(tmp0_safe_receiver);
            if (!(this.hrk_1 == null)) {
              this.hd_1 = 2;
              var tmp_4 = this.erk_1.fqq();
              suspendResult = localFirstThenRepoIfNull(tmp_4, getTitleForCoursePermission$slambda_0(this.frk_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_5 = this.erk_1.fqq();
              suspendResult = localFirstThenRepoIfNull(tmp_5, getTitleForCoursePermission$slambda_2(this.frk_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp5_elvis_lhs = suspendResult;
            this.irk_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.grk_1, this.erk_1.jqq());
            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.zqa_1.equals(this.hrk_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.aqb_1;
            tmp_6.irk_1 = tmp4_elvis_lhs == null ? this.erk_1.jqq().vol(this.hrk_1) : tmp4_elvis_lhs;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.irk_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.nrl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).prl = function (it, $completion) {
    var tmp = this.qrl(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.prl((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.orl_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.orl_1.a8k_1;
            } else {
              tmp_1 = false;
            }
            tmp_0 = createTabList(this.nrl_1, tmp_1, this.orl_1.b8k_1, this.orl_1.c8k_1);
          }
          var tabList = tmp_0;
          l$ret$1: do {
            var this_0 = this.nrl_1.nrm_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.qrm(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).qrl = function (it, completion) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda$slambda(this.nrl_1, completion);
    i.orl_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.prl(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.zrm_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.zrm_1.dqq().o7d().x8c(this.zrm_1.bqq(), this.zrm_1.dqp_1);
            var tmp_1 = ClazzDetailViewModel$slambda$slambda$slambda$slambda_0(this.zrm_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.zrm_1, completion);
    i.arn_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.jrn_1 = $this_launch;
    this.krn_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.jrn_1, VOID, VOID, ClazzDetailViewModel$slambda$slambda$slambda_0(this.krn_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.jrn_1, this.krn_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_117();
    var tabs = mutableListOf([new TabItem('CourseDetailOverviewView', mapOf_0(to('entityUid', $this.dqp_1.toString())), $this.jqq().vol(strings_getInstance().enk_1))]);
    if (showMembers) {
      Companion_getInstance_117();
      tabs.i1(new TabItem('CourseMembers', mapOf_0(to('clazzUid', $this.dqp_1.toString())), capitalizeFirstLetter($this.jqq().vol(strings_getInstance().un2_1))));
    }
    if (showProgressReport) {
      Companion_getInstance_117();
      tabs.i1(new TabItem('Gradebook', mapOf_0(to('clazzUid', $this.dqp_1.toString())), $this.jqq().vol(strings_getInstance().unq_1)));
    }
    if (showAttendance) {
      Companion_getInstance_117();
      tabs.i1(new TabItem('CourseLogListAttendanceView', mapOf_0(to('clazzUid', $this.dqp_1.toString())), $this.jqq().vol(strings_getInstance().smm_1)));
    }
    Companion_getInstance_117();
    tabs.i1(new TabItem('CourseGroups', mapOf_0(to('clazzUid', $this.dqp_1.toString())), $this.jqq().vol(strings_getInstance().en2_1)));
    return toList(tabs);
  }
  function Companion_114() {
    this.lrn_1 = 'Course';
  }
  var Companion_instance_163;
  function Companion_getInstance_131() {
    return Companion_instance_163;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_8(function_0) {
    this.mrn_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_8).t1d = function (value, $completion) {
    return this.mrn_1(value, $completion);
  };
  function ClazzDetailViewModel$slambda(this$0, resultContinuation) {
    this.vrn_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.vrn_1.nrm_1, ClazzDetailViewModel$slambda$slambda_0(this.wrn_1, this.vrn_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.vrn_1, completion);
    i.wrn_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.nrm_1 = MutableStateFlow(new ClazzDetailUiState());
    this.orm_1 = asStateFlow(this.nrm_1);
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzDetailViewModel$slambda_0(this, null));
  }
  function ClazzDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.prm_1 = tabs;
  }
  protoOf(ClazzDetailUiState).qrm = function (tabs) {
    return new ClazzDetailUiState(tabs);
  };
  protoOf(ClazzDetailUiState).toString = function () {
    return 'ClazzDetailUiState(tabs=' + this.prm_1 + ')';
  };
  protoOf(ClazzDetailUiState).hashCode = function () {
    return hashCode(this.prm_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.prm_1, tmp0_other_with_cast.prm_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.fro_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).uqh = function (hasPermission, $completion) {
    var tmp = this.vqh(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.uqh((!(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.fro_1.drp_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.trp(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.gro_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).vqh = function (hasPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda(this.fro_1, completion);
    i.gro_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.uqh(hasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation) {
    this.crq_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.crq_1.fqq().p7f();
            var tmp_1 = this.crq_1.zqp().toc().cl0_1;
            PermissionFlags_getInstance();
            var tmp_2 = distinctUntilChanged(tmp_0.zi1(tmp_1, new Long(512, 0)));
            var tmp_3 = ClazzDetailOverviewViewModel$slambda$slambda$slambda_0(this.crq_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.crq_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.lrq_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).prq = function (value, $completion) {
    var tmp = this.qrq(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.prq(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.nrq_1 = this.lrq_1;
            var tmp_1 = this;
            tmp_1.orq_1 = this.mrq_1;
            this.hd_1 = 1;
            var it = this.orq_1;
            suspendResult = this.nrq_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).qrq = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda(this.lrq_1, completion);
    i.mrq_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.prq(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$63(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zrq_1 = _this__u8e3s4;
    this.arr_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.brr_1 = this.arr_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.brr_1, null);
            suspendResult = this.zrq_1.crr_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.lrr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).nrr = function (courseBlockList, $completion) {
    var tmp = this.orr(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.nrr((!(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.lrr_1.drp_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.trp(VOID, VOID, this.mrr_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).orr = function (courseBlockList, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this.lrr_1, completion);
    i.mrr_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.nrr(courseBlockList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.xrr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).zrr = function (blockStatuses, $completion) {
    var tmp = this.ars(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.zrr((!(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.xrr_1.drp_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.trp(VOID, VOID, VOID, this.yrr_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).ars = function (blockStatuses, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this.xrr_1, completion);
    i.yrr_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.zrr(blockStatuses, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.jrs_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).lrs = function (scheduleList, $completion) {
    var tmp = this.mrs(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.lrs((!(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.jrs_1.drp_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.trp(VOID, this.krs_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).mrs = function (scheduleList, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this.jrs_1, completion);
    i.krs_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.lrs(scheduleList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.vrs_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.vrs_1.fqq().p7d().icl(this.vrs_1.dqp_1, false, false, systemTimeInMillis(), this.vrs_1.bqq());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this.vrs_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.vrs_1, completion);
    i.wrs_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.frt_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.frt_1.fqq().j7e().tjf(this.frt_1.dqp_1, listOf_0(this.frt_1.bqq()), this.frt_1.bqq());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(this.frt_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.frt_1, completion);
    i.grt_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.prt_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.prt_1.fqq().n7e().ehf(this.prt_1.dqp_1);
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this.prt_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.prt_1, completion);
    i.qrt_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.crr_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_3).jqh = 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_3).a1c = function (collector, $completion) {
    return this.jqh(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.zrt_1 = $this_launch;
    this.aru_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).uqh = function (hasViewPermission, $completion) {
    var tmp = this.vqh(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.uqh((!(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.bru_1) {
            launch(this.zrt_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this.aru_1, null));
            launch(this.zrt_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_2(this.aru_1, null));
            launch(this.zrt_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_4(this.aru_1, null));
          } else {
            l$ret$1: do {
              var this_0 = this.aru_1.drp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.trp(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).vqh = function (hasViewPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.zrt_1, this.aru_1, completion);
    i.bru_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.uqh(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.drp_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.trp(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).mru = function (clazzWithDisplayDetails, permissions, $completion) {
    var tmp = this.nru(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.mru(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.kru_1;
          var tmp_0;
          if (this.lru_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).nru = function (clazzWithDisplayDetails, permissions, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.kru_1 = clazzWithDisplayDetails;
    i.lru_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.mru(clazzWithDisplayDetails, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.wru_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).yru = function (it, $completion) {
    var tmp = this.zru(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.yru((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.wru_1.drp_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.trp(this.xru_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          var tmp1_currentTerminologyStrings = this.wru_1.drp_1.t2().prp_1;
          var tmp0_safe_receiver = this.xru_1;
          var tmp2_terminology = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q8k_1;
          var tmp3_json = this.wru_1.m4r();
          var tmp4_systemImpl = this.wru_1.jqq();
          parseAndUpdateTerminologyStringsIfNeeded(tmp1_currentTerminologyStrings, tmp2_terminology, tmp4_systemImpl, tmp3_json, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$lambda(this.wru_1));
          l$ret$3: do {
            var this_1 = this.wru_1.nqp_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_0 = this.xru_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.vq8(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).zru = function (it, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.wru_1, completion);
    i.xru_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.yru(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1($$this$unsafeFlow, resultContinuation) {
    this.irv_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).prq = function (value, $completion) {
    var tmp = this.qrq(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.prq(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.krv_1 = this.irv_1;
            var tmp_1 = this;
            tmp_1.lrv_1 = this.jrv_1;
            this.hd_1 = 1;
            var it = this.lrv_1;
            suspendResult = this.krv_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).qrq = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1(this.irv_1, completion);
    i.jrv_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.prq(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$64(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.urv_1 = _this__u8e3s4;
    this.vrv_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.wrv_1 = this.vrv_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_2(this.wrv_1, null);
            suspendResult = this.urv_1.xrv_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.xrv_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_4).jqh = 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_4).a1c = function (collector, $completion) {
    return this.jqh(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.grw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).uqh = function (hasEditPermission, $completion) {
    var tmp = this.vqh(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.uqh((!(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.grw_1.nqp_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vq8(prevValue.gq8_1.bq9(this.hrw_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.grw_1.drp_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.trp(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.hrw_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).vqh = function (hasEditPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.grw_1, completion);
    i.hrw_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.uqh(hasEditPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3($$this$unsafeFlow, resultContinuation) {
    this.qrw_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).prq = function (value, $completion) {
    var tmp = this.qrq(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.prq(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.srw_1 = this.qrw_1;
            var tmp_1 = this;
            tmp_1.trw_1 = this.rrw_1;
            this.hd_1 = 1;
            var it = this.trw_1;
            suspendResult = this.srw_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).qrq = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3(this.qrw_1, completion);
    i.rrw_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.prq(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$65(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.crx_1 = _this__u8e3s4;
    this.drx_1 = collector;
  }
  protoOf($collectCOROUTINE$65).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.erx_1 = this.drx_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_4(this.erx_1, null);
            suspendResult = this.crx_1.frx_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.frx_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_5).jqh = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$65(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.jqh(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.orx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).uqh = function (canAddStudent, $completion) {
    var tmp = this.vqh(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.uqh((!(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.orx_1.drp_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.trp(VOID, VOID, VOID, VOID, this.prx_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).vqh = function (canAddStudent, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.orx_1, completion);
    i.prx_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.uqh(canAddStudent, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation) {
    this.yrx_1 = $permissionFlow;
    this.zrx_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.yrx_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_3(this_0));
            suspendResult = collectLatest(tmp_0, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.ary_1, this.zrx_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.yrx_1, this.zrx_1, completion);
    i.ary_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.jry_1 = this$0;
    this.kry_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.jry_1.fqq().o7d().y8c(this.jry_1.dqp_1, systemTimeInMillis(), this.jry_1.bqq());
            var tmp_1 = combine(tmp_0, this.kry_1, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(null));
            var tmp_2 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.jry_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.jry_1, this.kry_1, completion);
    i.lry_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.ury_1 = $permissionFlow;
    this.vry_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.ury_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_4(this_0));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.vry_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.ury_1, this.vry_1, completion);
    i.wry_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.frz_1 = $permissionFlow;
    this.grz_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.frz_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_5(this_0));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.grz_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.frz_1, this.grz_1, completion);
    i.hrz_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.qrz_1 = $this_launch;
    this.rrz_1 = $permissionFlow;
    this.srz_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.qrz_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_2(this.rrz_1, this.srz_1, null));
          launch(this.qrz_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_4(this.srz_1, this.rrz_1, null));
          launch(this.qrz_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_6(this.rrz_1, this.srz_1, null));
          launch(this.qrz_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_8(this.rrz_1, this.srz_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.qrz_1, this.rrz_1, this.srz_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.frp_1;
    setClipboardStringUseCase$factory_0();
    return this_0.t2();
  }
  function _get_copyCourseUseCase__jeltyi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.irp_1;
    copyCourseUseCase$factory_0();
    return this_0.t2();
  }
  function onClickEdit($this) {
    Companion_getInstance_117();
    var tmp = to('entityUid', $this.dqp_1.toString());
    Companion_getInstance_117();
    $this.lqp_1.wp8('CourseEdit', mapOf([tmp, to('clazzAction', 'EDIT')]));
  }
  function Companion_115() {
    this.trz_1 = 'CourseDetailOverviewView';
  }
  var Companion_instance_164;
  function Companion_getInstance_132() {
    return Companion_instance_164;
  }
  function ClazzAction(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_9(function_0) {
    this.urz_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_9).t1d = function (value, $completion) {
    return this.urz_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.ds0_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.ds0_1.drp_1, ClazzDetailOverviewViewModel$slambda$slambda_0(this.ds0_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.ds0_1, completion);
    i.es0_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.ns0_1 = this$0;
    this.os0_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.ns0_1.drp_1, ClazzDetailOverviewViewModel$slambda$slambda_2(this.ps0_1, this.os0_1, this.ns0_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.ns0_1, this.os0_1, completion);
    i.ps0_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.ys0_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.ys0_1.drp_1.t2().cs1();
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.as1_1 = tmp_1;
            this.bs1_1 = this.ys0_1.drp_1.t2().krp_1;
            this.hd_1 = 1;
            suspendResult = _get_copyCourseUseCase__jeltyi(this.ys0_1).fs1(this.as1_1, this.bs1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            this_0.gs1_1.s8d_1 = this.ys0_1.jqq().vol(strings_getInstance().kns_1) + ' ' + this_0.gs1_1.s8d_1;
            var copyResult = this_0;
            Companion_getInstance_117();
            var tmp_2 = to('clazzAction', 'COPY');
            Companion_getInstance_116();
            var this_1 = this.ys0_1.m4r();
            var value = copyResult.gs1_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.ys0_1.m4r();
            var value_0 = copyResult.hs1_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.ys0_1.m4r();
            var value_1 = copyResult.is1_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.ys0_1.lqp_1.wp8('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.ys0_1, completion);
    i.zs0_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.drp_1 = MutableStateFlow(new ClazzDetailOverviewUiState());
    this.erp_1 = asStateFlow(this.drp_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.frp_1 = Instance(this, tmp$ret$0, null).a5d(this, setClipboardStringUseCase$factory());
    this.grp_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.hrp_1 = asSharedFlow(this.grp_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.irp_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.nqp_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.<anonymous>' call
        var tmp_3 = this.jqq().vol(strings_getInstance().amx_1);
        var tmp_4 = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.vq8(new FabUiState(false, tmp_3, tmp_4, ClazzDetailOverviewViewModel$onClickEdit$ref(this)));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_5 = this.aqq();
    launch(tmp_5, VOID, VOID, ClazzDetailOverviewViewModel$slambda_0(this, null));
    var tmp_6 = this.fqq().o7f();
    var tmp_7 = this.bqq();
    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.dqp_1, tmp_8, tmp_9, new Long(8, 0)), this.aqq(), Companion_getInstance_12().v1h());
    var tmp_10 = this.aqq();
    launch(tmp_10, VOID, VOID, ClazzDetailOverviewViewModel$slambda_2(this, permissionFlow, null));
  }
  protoOf(ClazzDetailOverviewViewModel).js1 = function (code) {
    _get_setClipboardStringUseCase__31i1s1(this).bp4(code);
    this.hqq().kq9(new Snack(this.jqq().vol(strings_getInstance().cna_1)));
  };
  protoOf(ClazzDetailOverviewViewModel).ks1 = function (courseBlock) {
    Companion_getInstance_126();
    var tmp = to('entityUid', courseBlock.t7x_1.toString());
    Companion_getInstance_126();
    var navArgs = mapOf([tmp, to('clazzUid', this.dqp_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.drp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.onClickCourseBlock.<anonymous>' call
          var nextValue = prevValue.trp(VOID, VOID, VOID, VOID, VOID, toggle_0(prevValue.orp_1, courseBlock.t7x_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      this.grp_1.i1h(new RefreshCommand());
    } else {
      if (tmp0_subject === 102) {
        this.lqp_1.wp8('CourseText', navArgs);
      } else {
        if (tmp0_subject === 103) {
          this.lqp_1.wp8('CourseAssignment', navArgs);
        } else {
          if (tmp0_subject === 105) {
            this.lqp_1.wp8('CourseDiscussion', navArgs);
          } else {
            if (tmp0_subject === 104) {
              Companion_getInstance_161();
              Companion_getInstance_126();
              var tmp_0 = to('entityUid', courseBlock.l7y_1.toString());
              Companion_getInstance_126();
              var tmp_1 = to('clazzUid', this.dqp_1.toString());
              Companion_getInstance_126();
              this.lqp_1.wp8('ContentEntry', mapOf([tmp_0, tmp_1, to('courseBlockUid', courseBlock.t7x_1.toString())]));
            }
          }
        }
      }
    }
  };
  protoOf(ClazzDetailOverviewViewModel).ls1 = function () {
    Companion_getInstance_126();
    this.lqp_1.wp8('CoursePermissionList', mapOf_0(to('clazzUid', this.dqp_1.toString())));
  };
  protoOf(ClazzDetailOverviewViewModel).ms1 = function () {
    var tmp = this.aqq();
    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.lrp_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.orp_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.jrp_1 = clazzAndDetail;
    this.krp_1 = scheduleList;
    this.lrp_1 = courseBlockList;
    this.mrp_1 = blockStatusesForActiveUser;
    this.nrp_1 = clazzCodeVisible;
    this.orp_1 = collapsedBlockUids;
    this.prp_1 = terminologyStrings;
    this.qrp_1 = managePermissionVisible;
    this.rrp_1 = canAddNewCourse;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.srp_1 = lazy(tmp_0, ClazzDetailOverviewUiState$displayBlockList$delegate$lambda(this));
  }
  protoOf(ClazzDetailOverviewUiState).cs1 = function () {
    var tmp0_safe_receiver = this.jrp_1;
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p8k_1;
  };
  protoOf(ClazzDetailOverviewUiState).ns1 = function () {
    var tmp;
    var tmp0_safe_receiver = this.jrp_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.jrp_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).os1 = function () {
    var tmp0_safe_receiver = this.jrp_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).ps1 = function () {
    var tmp0_safe_receiver = this.jrp_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).qs1 = function () {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.lrp_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).rs1 = function () {
    var tmp2_safe_receiver = this.prp_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.xqa(strings_getInstance().en0_1);
    var tmp = (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs) + ': ' + this.ps1() + ', ';
    var tmp0_safe_receiver = this.prp_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xqa(strings_getInstance().zmm_1);
    return tmp + ((tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs) + ': ' + this.os1());
  };
  protoOf(ClazzDetailOverviewUiState).ss1 = function () {
    return this.qrp_1;
  };
  protoOf(ClazzDetailOverviewUiState).ts1 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.srp_1;
    displayBlockList$factory();
    return this_0.t2();
  };
  protoOf(ClazzDetailOverviewUiState).us1 = function (clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse) {
    return new ClazzDetailOverviewUiState(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse);
  };
  protoOf(ClazzDetailOverviewUiState).trp = function (clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse, $super) {
    clazzAndDetail = clazzAndDetail === VOID ? this.jrp_1 : clazzAndDetail;
    scheduleList = scheduleList === VOID ? this.krp_1 : scheduleList;
    courseBlockList = courseBlockList === VOID ? this.lrp_1 : courseBlockList;
    blockStatusesForActiveUser = blockStatusesForActiveUser === VOID ? this.mrp_1 : blockStatusesForActiveUser;
    clazzCodeVisible = clazzCodeVisible === VOID ? this.nrp_1 : clazzCodeVisible;
    collapsedBlockUids = collapsedBlockUids === VOID ? this.orp_1 : collapsedBlockUids;
    terminologyStrings = terminologyStrings === VOID ? this.prp_1 : terminologyStrings;
    managePermissionVisible = managePermissionVisible === VOID ? this.qrp_1 : managePermissionVisible;
    canAddNewCourse = canAddNewCourse === VOID ? this.rrp_1 : canAddNewCourse;
    return $super === VOID ? this.us1(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse) : $super.us1.call(this, clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse);
  };
  protoOf(ClazzDetailOverviewUiState).toString = function () {
    return 'ClazzDetailOverviewUiState(clazzAndDetail=' + this.jrp_1 + ', scheduleList=' + this.krp_1 + ', courseBlockList=' + this.lrp_1 + ', blockStatusesForActiveUser=' + this.mrp_1 + ', clazzCodeVisible=' + this.nrp_1 + ', collapsedBlockUids=' + this.orp_1 + ', terminologyStrings=' + this.prp_1 + ', managePermissionVisible=' + this.qrp_1 + ', canAddNewCourse=' + this.rrp_1 + ')';
  };
  protoOf(ClazzDetailOverviewUiState).hashCode = function () {
    var result = this.jrp_1 == null ? 0 : this.jrp_1.hashCode();
    result = imul(result, 31) + hashCode(this.krp_1) | 0;
    result = imul(result, 31) + hashCode(this.lrp_1) | 0;
    result = imul(result, 31) + hashCode(this.mrp_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nrp_1) | 0;
    result = imul(result, 31) + hashCode(this.orp_1) | 0;
    result = imul(result, 31) + (this.prp_1 == null ? 0 : this.prp_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qrp_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rrp_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.jrp_1, tmp0_other_with_cast.jrp_1))
      return false;
    if (!equals(this.krp_1, tmp0_other_with_cast.krp_1))
      return false;
    if (!equals(this.lrp_1, tmp0_other_with_cast.lrp_1))
      return false;
    if (!equals(this.mrp_1, tmp0_other_with_cast.mrp_1))
      return false;
    if (!(this.nrp_1 === tmp0_other_with_cast.nrp_1))
      return false;
    if (!equals(this.orp_1, tmp0_other_with_cast.orp_1))
      return false;
    if (!equals(this.prp_1, tmp0_other_with_cast.prp_1))
      return false;
    if (!(this.qrp_1 === tmp0_other_with_cast.qrp_1))
      return false;
    if (!(this.rrp_1 === tmp0_other_with_cast.rrp_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.ts1();
    }, null);
  }
  function Companion_116() {
    Companion_instance_165 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.vs1_1 = [null, new ArrayListSerializer($serializer_getInstance_7()), new ArrayListSerializer($serializer_getInstance_8())];
  }
  var Companion_instance_165;
  function Companion_getInstance_133() {
    if (Companion_instance_165 == null)
      new Companion_116();
    return Companion_instance_165;
  }
  function $serializer_60() {
    $serializer_instance_60 = 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.ws1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_60).q44 = function () {
    return this.ws1_1;
  };
  protoOf($serializer_60).k4g = function () {
    var tmp0_cached = Companion_getInstance_133().vs1_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_60).s44 = function (decoder) {
    var tmp0_desc = this.ws1_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_133().vs1_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_60).xs1 = function (encoder, value) {
    var tmp0_desc = this.ws1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_133().vs1_1;
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_9(), value.gs1_1);
    tmp1_output.y49(tmp0_desc, 1, tmp2_cached[1], value.hs1_1);
    tmp1_output.y49(tmp0_desc, 2, tmp2_cached[2], value.is1_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_60).r44 = function (encoder, value) {
    return this.xs1(encoder, value instanceof CopyCourseResult ? value : THROW_CCE());
  };
  var $serializer_instance_60;
  function $serializer_getInstance_72() {
    if ($serializer_instance_60 == null)
      new $serializer_60();
    return $serializer_instance_60;
  }
  function CopyCourseResult_init_$Init$(seen1, clazz, courseBlocks, schedules, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_72().ws1_1);
    }
    $this.gs1_1 = clazz;
    $this.hs1_1 = courseBlocks;
    $this.is1_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_133();
    this.gs1_1 = clazz;
    this.hs1_1 = courseBlocks;
    this.is1_1 = schedules;
  }
  protoOf(CopyCourseResult).toString = function () {
    return 'CopyCourseResult(clazz=' + this.gs1_1 + ', courseBlocks=' + this.hs1_1 + ', schedules=' + this.is1_1 + ')';
  };
  protoOf(CopyCourseResult).hashCode = function () {
    var result = this.gs1_1.hashCode();
    result = imul(result, 31) + hashCode(this.hs1_1) | 0;
    result = imul(result, 31) + hashCode(this.is1_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.gs1_1.equals(tmp0_other_with_cast.gs1_1))
      return false;
    if (!equals(this.hs1_1, tmp0_other_with_cast.hs1_1))
      return false;
    if (!equals(this.is1_1, tmp0_other_with_cast.is1_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.zhf_1 = $newScheduleUid;
      $this$shallowCopy.ghg_1 = $clazz.r8d_1;
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$66(_this__u8e3s4, clazz, scheduleListVal, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.gs2_1 = _this__u8e3s4;
    this.hs2_1 = clazz;
    this.is2_1 = scheduleListVal;
  }
  protoOf($invokeCOROUTINE$66).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.gs2_1.ds1_1.p7d().hcl(this.hs2_1.r8d_1, false, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.js2_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.gs2_1.ds1_1.g7f().sft(this.hs2_1.r8d_1, false, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.ks2_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = this.gs2_1.ds1_1.o7d().u8c(this.hs2_1.r8d_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.ls2_1 = suspendResult;
            this.ms2_1 = this.ls2_1 == null ? new ClazzWithHolidayCalendarAndAndTerminology() : this.ls2_1;
            var tmp_0 = this;
            var this_0 = this.js2_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.ks2_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.ns2_1 = destination;
            this.os2_1 = get_doorPrimaryKeyManager(this.gs2_1.ds1_1);
            this.hd_1 = 4;
            Companion_getInstance_4();
            suspendResult = this.os2_1.o62(6, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.ps2_1 = suspendResult;
            this.qs2_1 = this.gs2_1.es1_1.toc().cl0_1;
            this.hd_1 = 5;
            suspendResult = this.os2_1.o62(21, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.rs2_1 = suspendResult;
            var tmp_8 = this;
            tmp_8.ss2_1 = this.ns2_1;
            var tmp_9 = this;
            tmp_9.ts2_1 = this.ss2_1;
            var tmp_10 = this;
            tmp_10.us2_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.ss2_1, 10));
            this.vs2_1 = this.ts2_1.w();
            this.hd_1 = 6;
            continue $sm;
          case 6:
            if (!this.vs2_1.f()) {
              this.hd_1 = 10;
              continue $sm;
            }

            this.ws2_1 = this.vs2_1.e();
            var tmp_11 = this;
            tmp_11.xs2_1 = this.ws2_1;
            this.hd_1 = 7;
            suspendResult = this.os2_1.o62(124, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.ys2_1 = suspendResult;
            this.zs2_1 = this.xs2_1.zk9_1;
            if (this.zs2_1 == null) {
              this.as3_1 = null;
              this.hd_1 = 9;
              continue $sm;
            } else {
              this.hd_1 = 8;
              suspendResult = this.os2_1.o62(520, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 8:
            var tmp1_caUid = suspendResult;
            this.as3_1 = this.zs2_1.ckf(tmp1_caUid, VOID, VOID, new Long(0, 0), VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, 1, VOID, VOID, VOID, VOID, this.ps2_1);
            this.hd_1 = 9;
            continue $sm;
          case 9:
            var copiedAssignment = this.as3_1;
            var tmp4_elvis_lhs = copiedAssignment == null ? null : copiedAssignment.n7t_1;
            var ARGUMENT = this.xs2_1.eka(this.xs2_1.sk9_1.mkn(this.ys2_1, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ps2_1, VOID, VOID, VOID, tmp4_elvis_lhs == null ? new Long(0, 0) : tmp4_elvis_lhs), VOID, VOID, VOID, VOID, VOID, VOID, copiedAssignment);
            this.us2_1.i1(ARGUMENT);
            this.hd_1 = 6;
            continue $sm;
          case 10:
            var courseBlocks = this.us2_1;
            shallowCopyTo(this.hs2_1, this.gs2_1, this.ms2_1);
            var tmp_12 = this.ms2_1;
            var tmp1_safe_receiver = this.ms2_1.l8g_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.mko(this.ps2_1);
            tmp_12.l8g_1 = tmp2_elvis_lhs == null ? new CoursePicture(this.ps2_1) : tmp2_elvis_lhs;
            this.ms2_1.r8d_1 = this.ps2_1;
            this.ms2_1.p8e_1 = this.qs2_1;
            this.ms2_1.r8d_1 = this.ps2_1;
            this.ms2_1.p8e_1 = this.qs2_1;
            var this_2 = this.is2_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.rs2_1, this.hs2_1)));
            }

            var schedules = destination_1;
            return new CopyCourseResult(this.ms2_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.ds1_1 = repoOrDb;
    this.es1_1 = accountManager;
  }
  protoOf(CopyCourseUseCase).fs1 = function (clazz, scheduleListVal, $completion) {
    var tmp = new $invokeCOROUTINE$66(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.rqv_1);
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.js3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).ns3 = function (it, $completion) {
    var tmp = this.jo1(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.ns3(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.ks3_1.o7d();
            var tmp_1;
            if (!this.js3_1.rqv_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.ls3_1 = tmp_1;
            if (this.ls3_1 == null) {
              this.ms3_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.ls3_1.u8c(this.js3_1.rqv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ms3_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp1_safe_receiver = this.ms3_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.js3_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).jo1 = function (it, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda(this.js3_1, completion);
    i.ks3_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.ns3(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.ws3_1 = this$0;
    this.xs3_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).cs4 = 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.cs4($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.ys3_1 = new ClazzWithHolidayCalendarAndAndTerminology();
            var tmp_1 = this;
            tmp_1.zs3_1 = this.ys3_1;
            this.zs3_1.r8d_1 = this.ws3_1.hs5_1;
            this.zs3_1.s8d_1 = '';
            this.zs3_1.x8d_1 = true;
            this.zs3_1.z8d_1 = systemTimeInMillis();
            this.zs3_1.j8e_1 = getDefaultTimeZoneId();
            var tmp_2 = this.zs3_1;
            Companion_getInstance_117();
            var tmp0_safe_receiver = this.xs3_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.ws3_1.fqq().q7d();
            var tmp_4;
            if (!this.zs3_1.e8e_1.equals(new Long(0, 0))) {
              tmp_4 = this_0;
            } else {
              tmp_4 = null;
            }

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

          case 1:
            this.bs4_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var ARGUMENT = this.bs4_1;
            this.zs3_1.k8g_1 = ARGUMENT;
            this.zs3_1.l8g_1 = new CoursePicture(this.ws3_1.hs5_1);
            this.zs3_1.p8e_1 = this.ws3_1.bqq();
            return this.ys3_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.ws3_1, this.xs3_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.cs4($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.fs5_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.ss5(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.bs6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).fs6 = function (it, $completion) {
    var tmp = this.jo1(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.fs6(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.cs6_1.n7e();
            var tmp_1;
            if (!this.bs6_1.rqv_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.ds6_1 = tmp_1;
            if (this.ds6_1 == null) {
              this.es6_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.ds6_1.fhf(this.bs6_1.rqv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.es6_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.es6_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).jo1 = function (it, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_3(this.bs6_1, completion);
    i.cs6_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.fs6(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).os6 = 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.os6($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.os6($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.fs5_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.ss5(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.xs6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).fs7 = function (db, $completion) {
    var tmp = this.jo1(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.fs7(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.ys6_1.p7d();
            var tmp_1;
            if (!this.xs6_1.rqv_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.zs6_1 = tmp_1;
            if (this.zs6_1 == null) {
              this.as7_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.zs6_1.hcl(this.xs6_1.rqv_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.as7_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.bs7_1 = this.as7_1;
            this.cs7_1 = this.bs7_1 == null ? emptyList() : this.bs7_1;
            var tmp_2 = this;
            var this_1 = this.ys6_1.g7f();
            var tmp_3;
            if (!this.xs6_1.rqv_1.equals(new Long(0, 0))) {
              tmp_3 = this_1;
            } else {
              tmp_3 = null;
            }

            tmp_2.ds7_1 = tmp_3;
            if (this.ds7_1 == null) {
              this.es7_1 = null;
              this.hd_1 = 4;
              continue $sm;
            } else {
              this.hd_1 = 3;
              suspendResult = this.ds7_1.sft(this.xs6_1.rqv_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 3:
            this.es7_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var tmp3_elvis_lhs = this.es7_1;
            var assignmentPeerAllocations = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
            var this_2 = this.cs7_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).jo1 = function (db, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_7(this.xs6_1, completion);
    i.ys6_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.fs7(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_9(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).os7 = 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.os7($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.os7($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.fs5_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.ss5(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.zhf_1.equals($returnedSchedule.zhf_1);
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda$slambda(this$0, $newSchedules, resultContinuation) {
    this.xs7_1 = this$0;
    this.ys7_1 = $newSchedules;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).wr2 = 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.wr2((!(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.xs7_1.m4r().r45(ListSerializer(Companion_instance_29.n4r()), this.ys7_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.xs7_1, this.ys7_1, completion);
    i.zs7_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.wr2($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_11(this$0, $savedStateHandle, resultContinuation) {
    this.is8_1 = this$0;
    this.js8_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).zqc = function (result, $completion) {
    var tmp = this.aqd(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.zqc(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.ks8_1.gqc_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.ls8_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.is8_1.fs5_1.t2().ps5_1;
            tmp_3.ms8_1 = replaceOrAppend(tmp_4, this.ls8_1, ClazzEditViewModel$slambda$slambda$slambda$lambda_0(this.ls8_1));
            l$ret$1: do {
              var this_0 = this.is8_1.fs5_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ss5(VOID, VOID, VOID, VOID, VOID, this.ms8_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.is8_1, this.ms8_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.js8_1.mql('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).aqd = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_11(this.is8_1, this.js8_1, completion);
    i.ks8_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.zqc(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_13(this$0, resultContinuation) {
    this.vs8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).zqc = function (result, $completion) {
    var tmp = this.aqd(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.zqc(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.ws8_1.gqc_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.xs8_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.vs8_1.fs5_1.t2().qs5_1;
            var tmp1_safe_receiver = this.vs8_1.fs5_1.t2().ls5_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.r8d_1;
            tmp_3.ys8_1 = this.vs8_1.as5_1.rpd(tmp_4, tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, this.xs8_1);
            this.hd_1 = 1;
            suspendResult = updateCourseBlockList(this.vs8_1, this.ys8_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).aqd = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_13(this.vs8_1, completion);
    i.ws8_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.zqc(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.hs9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).zqc = function (result, $completion) {
    var tmp = this.aqd(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.zqc(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.is9_1.gqc_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.hs9_1.fs5_1.t2().ls5_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.hs9_1.js9(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).aqd = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_15(this.hs9_1, completion);
    i.is9_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.zqc(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.ss9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).zqc = function (result, $completion) {
    var tmp = this.aqd(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.zqc(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.ts9_1.gqc_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.ss9_1.fs5_1.t2().ls5_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.ss9_1.js9(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).aqd = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_17(this.ss9_1, completion);
    i.ts9_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.zqc(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.csa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).zqc = function (result, $completion) {
    var tmp = this.aqd(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.zqc(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.dsa_1.gqc_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.csa_1.fs5_1.t2().ls5_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.csa_1.js9(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).aqd = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_19(this.csa_1, completion);
    i.dsa_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.zqc(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.msa_1 = this$0;
    this.nsa_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda).psa = 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.psa((!(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.msa_1, null);
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_2(this.msa_1, this.nsa_1, null);
            suspendResult = this.msa_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzEditViewModel$slambda$slambda$lambda(this.msa_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            Companion_getInstance_124();
            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.nsa_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.msa_1, this.nsa_1, completion);
    i.osa_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.psa($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.ysa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_1).asb = 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.asb((!(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.ysa_1, null);
            var tmp_3 = ClazzEditViewModel$slambda$slambda$slambda_6(null);
            suspendResult = this.ysa_1.tqq(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ClazzEditViewModel$slambda$slambda$lambda_0(this.ysa_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.ysa_1, completion);
    i.zsa_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.asb($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.jsb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_3).lsb = 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.lsb((!(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.jsb_1, null);
            var tmp_3 = ClazzEditViewModel$slambda$slambda$slambda_10(null);
            suspendResult = this.jsb_1.tqq(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ClazzEditViewModel$slambda$slambda$lambda_1(this.jsb_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.jsb_1, completion);
    i.ksb_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.lsb($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.usb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_5).wr2 = 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.wr2((!(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.usb_1.m4r();
          var value = this.usb_1.fs5_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.usb_1, completion);
    i.vsb_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.wr2($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_7(this$0, $savedStateHandle, resultContinuation) {
    this.esc_1 = this$0;
    this.fsc_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.esc_1.nqq(this.esc_1.iqq(), 'Schedule');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_12(this.esc_1, this.fsc_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.esc_1, this.fsc_1, completion);
    i.gsc_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.psc_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.psc_1.nqq(this.psc_1.iqq(), 'courseblock');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_14(this.psc_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.psc_1, completion);
    i.qsc_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.zsc_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.zsc_1.nqq(this.zsc_1.iqq(), 'timeZone');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_16(this.zsc_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.zsc_1, completion);
    i.asd_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.jsd_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.jsd_1.nqq(this.jsd_1.iqq(), 'terminology');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_18(this.jsd_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.jsd_1, completion);
    i.ksd_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.tsd_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.tsd_1.nqq(this.tsd_1.iqq(), 'clazzDescriptionHtml');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_20(this.tsd_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.tsd_1, completion);
    i.usd_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.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda($clazzUid) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.ghg_1 = $clazzUid;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_0(it) {
    return it.zhf_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_1(it) {
    return it.sk9_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.ese_1 = this$0;
    this.fse_1 = $initEntity;
    this.gse_1 = $updateImage;
    this.hse_1 = $coursePictureVal;
    this.ise_1 = $entity;
    this.jse_1 = $initState;
    this.kse_1 = $courseBlockListVal;
    this.lse_1 = $updatedCourseBlockPictures;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(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.io1(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.ese_1.rqv_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = _get_createNewClazzUseCase__mo489e(this.ese_1).cp1(this.fse_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.ese_1.fqq().o7d().v8c(this.fse_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.gse_1 ? !(this.hse_1 == null) : false) {
              this.hse_1.r8g_1 = systemTimeInMillis();
              this.hse_1.q8g_1 = this.ise_1.r8d_1;
              this.hd_1 = 4;
              suspendResult = this.ese_1.dqq().d7f().ge4(this.hse_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.nse_1 = this.ise_1.r8d_1;
            var tmp_0 = this;
            var this_0 = this.ese_1.fs5_1.t2().ps5_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.nse_1)));
            }

            tmp_0.ose_1 = destination;
            this.hd_1 = 6;
            suspendResult = this.ese_1.fqq().n7e().chf(this.ose_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.hd_1 = 7;
            var tmp_1 = this.ese_1.fqq().n7e();
            suspendResult = deactivateByUids(tmp_1, findKeysNotInOtherList(this.jse_1.ps5_1, this.ose_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_0), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.pse_1 = this.ese_1.bs5_1.tpd(this.kse_1);
            this.hd_1 = 8;
            var tmp_2 = this.ese_1.fqq().p7d();
            var this_1 = this.pse_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.sk9_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.ese_1.fqq().p7d();
            suspendResult = deactivateByUids_0(tmp_3, findKeysNotInOtherList(this.jse_1.qs5_1, this.pse_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.kse_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.zk9_1;
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_1.i1(tmp0_safe_receiver);
              }
            }

            tmp_4.qse_1 = destination_1;
            this.hd_1 = 10;
            suspendResult = this.ese_1.fqq().q7e().r7s(this.qse_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            var tmp_5 = this;
            var this_3 = this.jse_1.qs5_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.zk9_1;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_2.i1(tmp0_safe_receiver_0);
              }
            }

            tmp_5.rse_1 = findKeysNotInOtherList(destination_2, this.qse_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_2);
            var tmp_6 = this;
            var this_4 = this.ese_1.fqq().q7e();
            var tmp_7;
            if (!this.rse_1.c1()) {
              tmp_7 = this_4;
            } else {
              tmp_7 = null;
            }

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

          case 11:
            var tmp_8 = this;
            tmp_8.tse_1 = Unit_instance;
            this.hd_1 = 12;
            continue $sm;
          case 12:
            var tmp_9 = this;
            var this_5 = this.kse_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.bka_1;
              addAll(destination_3, list);
            }

            tmp_9.use_1 = destination_3;
            var tmp_10 = this;
            var this_6 = this.jse_1.qs5_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.bka_1;
              addAll(destination_4, list_0);
            }

            tmp_10.vse_1 = destination_4;
            this.hd_1 = 13;
            var tmp_11 = this.ese_1.fqq().g7f();
            suspendResult = deactivateByUids_1(tmp_11, findKeysNotInOtherList(this.vse_1, this.use_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.ese_1.fqq().g7f().tft(this.use_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 14:
            var tmp_12 = this;
            var this_7 = this.kse_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.wk9_1;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination_5.i1(tmp0_safe_receiver_1);
              }
            }

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

            this.yse_1 = this.xse_1.e();
            var tmp_13 = this;
            tmp_13.zse_1 = this.yse_1;
            this.hd_1 = 16;
            suspendResult = this.ese_1.ds5_1.xp7(this.zse_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.ese_1.dqq().q7f();
            var tmp_15;
            if (!this.lse_1.c1()) {
              tmp_15 = this_8;
            } else {
              tmp_15 = null;
            }

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

          case 18:
            var tmp_16 = this;
            tmp_16.bsf_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).jo1 = function (it, completion) {
    var i = new ClazzEditViewModel$onClickSave$slambda$slambda(this.ese_1, this.fse_1, this.gse_1, this.hse_1, this.ise_1, this.jse_1, this.kse_1, this.lse_1, completion);
    i.mse_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlock$slambda$lambda($updatedBlock) {
    return function (it) {
      return it.sk9_1.t7x_1.equals($updatedBlock.sk9_1.t7x_1);
    };
  }
  function _get_createNewClazzUseCase__mo489e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.is5_1;
    createNewClazzUseCase$factory_0();
    return this_0.t2();
  }
  function updateCourseBlockList($this, newCourseBlockList, $completion) {
    var tmp = new $updateCourseBlockListCOROUTINE$67($this, newCourseBlockList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function hasErrors(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.ms5_1 == null) ? true : !(_this__u8e3s4.ns5_1 == null)) ? true : !(_this__u8e3s4.os5_1 == null);
  }
  function updateCourseBlock($this, updatedBlock) {
    var tmp = $this.aqq();
    launch(tmp, VOID, VOID, ClazzEditViewModel$updateCourseBlock$slambda_0($this, updatedBlock, null));
  }
  function Companion_117() {
    this.nsf_1 = 'CourseEdit';
    this.osf_1 = 'Schedule';
    this.psf_1 = 'schedule';
    this.qsf_1 = 'courseblock';
    this.rsf_1 = 'timeZone';
    this.ssf_1 = 'terminology';
    this.tsf_1 = 'courseblocks';
    this.usf_1 = 'clazzDescriptionHtml';
  }
  var Companion_instance_166;
  function Companion_getInstance_134() {
    return Companion_instance_166;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_10(function_0) {
    this.vsf_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_10).t1d = function (value, $completion) {
    return this.vsf_1(value, $completion);
  };
  function ClazzEditViewModel$slambda(this$0, resultContinuation) {
    this.esg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda).hsg = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda).he = function (p1, $completion) {
    return this.hsg(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.esg_1.rqv_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              var tmp_0 = this.fsg_1.o7f();
              var tmp_1 = this.esg_1.bqq();
              PermissionFlags_getInstance();
              suspendResult = tmp_0.jdk(tmp_1, this.esg_1.rqv_1, new Long(2, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_2 = this.fsg_1.p7f();
              var tmp_3 = this.esg_1.bqq();
              PermissionFlags_getInstance();
              suspendResult = tmp_2.yi1(tmp_3, new Long(512, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.gsg_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.gsg_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.gsg_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).jo1 = function (it, completion) {
    var i = new ClazzEditViewModel$slambda(this.esg_1, completion);
    i.fsg_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.hsg(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.qsg_1 = $savedStateHandle;
    this.rsg_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.ssg_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_0(this.rsg_1, this.qsg_1, null));
            var tmp_1 = async(this.ssg_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_2(this.rsg_1, null));
            suspendResult = awaitAll([tmp_0, tmp_1, async(this.ssg_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_4(this.rsg_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_126();
            if (this.qsg_1.ba('initState') == null) {
              var tmp_2 = this;
              Companion_getInstance_126();
              tmp_2.tsg_1 = 'initState';
              this.hd_1 = 2;
              var tmp_3 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_3, ClazzEditViewModel$slambda$slambda_6(this.rsg_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.qsg_1.mql(this.tsg_1, ARGUMENT);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            launch(this.ssg_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_8(this.rsg_1, this.qsg_1, null));
            launch(this.ssg_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_10(this.rsg_1, null));
            launch(this.ssg_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_12(this.rsg_1, null));
            launch(this.ssg_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_14(this.rsg_1, null));
            launch(this.ssg_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_16(this.rsg_1, null));
            l$ret$1: do {
              var this_0 = this.rsg_1.fs5_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ss5(true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.rsg_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_4 = Companion_getInstance_98().dq9_1;
                var tmp_5 = this.rsg_1.jqq().vol(strings_getInstance().on4_1);
                var nextValue_0 = prevValue_0.vq8(VOID, tmp_4, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_5, VOID, ClazzEditViewModel$onClickSave$ref(this.rsg_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.qsg_1, this.rsg_1, completion);
    i.ssg_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.csh_1 = this$0;
    this.dsh_1 = $newCourseBlockList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).wr2 = 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.wr2((!(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.csh_1.m4r().r45(ListSerializer(Companion_getInstance_13().n4r()), this.dsh_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.csh_1, this.dsh_1, completion);
    i.esh_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.wr2($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.nsh_1 = $commitDelay;
    this.osh_1 = $entity;
    this.psh_1 = $this;
    this.qsh_1 = $key;
    this.rsh_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.nsh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.osh_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.psh_1.pqq(this.psh_1.jqp_1, this.qsh_1, this.rsh_1, this.osh_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.nsh_1, this.osh_1, this.psh_1, this.qsh_1, this.rsh_1, completion);
    i.ssh_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().mmi($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).lmi();
      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().mmi($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).lmi();
        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.fs5_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.ss5(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$slambda(this$0, $entity, $initEntity, resultContinuation) {
    this.bsi_1 = this$0;
    this.csi_1 = $entity;
    this.dsi_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_126();
            suspendResult = this.bsi_1.oqq(this.bsi_1.jqp_1, 'initState', Companion_getInstance_135().n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_0.fsi_1 = tmp_1;
            Napier_getInstance().i5e('onClickSave: start transaction');
            this.gsi_1 = this.bsi_1.fs5_1.t2().qs5_1;
            this.hsi_1 = this.csi_1.l8g_1;
            var tmp_2 = this;
            var tmp_3;
            if (!(this.hsi_1 == null)) {
              Companion_getInstance_124();
              var tmp_4 = this.bsi_1.jqp_1.ba('initPicUri');
              var tmp1_safe_receiver = this.csi_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.isi_1 = tmp_3;
            var tmp_5 = this;
            var this_0 = this.gsi_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.tk9_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.fsi_1.qs5_1.w();
                while (tmp0_iterator_0.f()) {
                  var element_0 = tmp0_iterator_0.e();
                  var tmp0_safe_receiver_0 = element_0.tk9_1;
                  var tmp_6 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.w7y_1;
                  var tmp1_safe_receiver_0 = element.tk9_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.tk9_1;
              var initImageUri = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.y7y_1;
              var tmp3_safe_receiver = element.tk9_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.jsi_1 = destination;
            this.hd_1 = 2;
            var tmp_9 = this.bsi_1.dqq();
            suspendResult = withDoorTransactionAsync(tmp_9, VOID, ClazzEditViewModel$onClickSave$slambda$slambda_0(this.bsi_1, this.dsi_1, this.isi_1, this.hsi_1, this.csi_1, this.fsi_1, this.gsi_1, this.jsi_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.ksi_1 = this.gsi_1;
            this.lsi_1 = this.ksi_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.lsi_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.msi_1 = this.lsi_1.e();
            var tmp_11 = this;
            tmp_11.nsi_1 = this.msi_1;
            this.osi_1 = this.nsi_1.uk9_1;
            if (this.osi_1 == null) {
              this.psi_1 = null;
              this.hd_1 = 5;
              continue $sm;
            } else {
              var tmp_12 = this;
              tmp_12.qsi_1 = this.osi_1;
              var tmp_13 = this;
              tmp_13.rsi_1 = this.qsi_1;
              this.hd_1 = 4;
              var tmp$ret$2;
              l$ret$3: do {
                var tmp0_iterator_1 = this.fsi_1.qs5_1.w();
                while (tmp0_iterator_1.f()) {
                  var element_1 = tmp0_iterator_1.e();
                  var tmp0_safe_receiver_2 = element_1.tk9_1;
                  var tmp_14 = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.w7y_1;
                  var tmp1_safe_receiver_2 = this.nsi_1.tk9_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.tk9_1;
              suspendResult = this.bsi_1.cs5_1.qpd(this.rsi_1, null, this.nsi_1.vk9_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.psi_1 = this.qsi_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.bsi_1.es5_1;
            var tmp_16;
            if (this.isi_1) {
              tmp_16 = this_1;
            } else {
              tmp_16 = null;
            }

            tmp_15.ssi_1 = tmp_16;
            if (this.ssi_1 == null) {
              this.tsi_1 = null;
              this.hd_1 = 8;
              continue $sm;
            } else {
              this.hd_1 = 7;
              var tmp_17 = this.csi_1.r8d_1;
              var tmp3_safe_receiver_0 = this.hsi_1;
              suspendResult = this.ssi_1.gou(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.tsi_1 = Unit_instance;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var tmp_19 = this;
            tmp_19.usi_1 = this.jsi_1;
            this.vsi_1 = this.usi_1.w();
            this.hd_1 = 9;
            continue $sm;
          case 9:
            if (!this.vsi_1.f()) {
              this.hd_1 = 11;
              continue $sm;
            }

            this.wsi_1 = this.vsi_1.e();
            var tmp_20 = this;
            tmp_20.xsi_1 = this.wsi_1;
            this.hd_1 = 10;
            var tmp_21 = this.xsi_1.w7y_1;
            suspendResult = this.bsi_1.es5_1.gou(tmp_21, 6677, this.xsi_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.bsi_1.tqv('Course', this.csi_1.r8d_1, this.csi_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.bsi_1, this.csi_1, this.dsi_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.isj_1 = this$0;
    this.jsj_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.isj_1, this.jsj_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.isj_1, this.jsj_1, completion);
    i.ksj_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.tsj_1 = this$0;
    this.usj_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.tsj_1.fs5_1.t2().qs5_1;
            suspendResult = updateCourseBlockList(this.tsj_1, replace_0(tmp_0, this.usj_1, ClazzEditViewModel$updateCourseBlock$slambda$lambda(this.usj_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.tsj_1, this.usj_1, completion);
    i.vsj_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.esk_1 = this$0;
    this.fsk_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.esk_1.fs5_1.t2().qs5_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (!element.sk9_1.t7x_1.equals(this.fsk_1.sk9_1.t7x_1)) {
                destination.i1(element);
              }
            }

            suspendResult = updateCourseBlockList(this.esk_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.esk_1, this.fsk_1, completion);
    i.gsk_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$67(_this__u8e3s4, newCourseBlockList, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ksf_1 = _this__u8e3s4;
    this.lsf_1 = newCourseBlockList;
  }
  protoOf($updateCourseBlockListCOROUTINE$67).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.ksf_1.fs5_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ss5(VOID, VOID, VOID, VOID, VOID, VOID, this.lsf_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.msf_1 = this.ksf_1.jqp_1;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, ClazzEditViewModel$updateCourseBlockList$slambda_0(this.ksf_1, this.lsf_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.msf_1.mql('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).yk3_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.as5_1 = addOrUpdateCourseBlockUseCase;
    this.bs5_1 = updateCourseBlocksOnReorderOrCommitUseCase;
    this.cs5_1 = saveContentEntryUseCase;
    this.ds5_1 = importContentUseCase;
    this.es5_1 = enqueueSavePictureUseCase;
    this.fs5_1 = MutableStateFlow(new ClazzEditUiState());
    this.gs5_1 = asStateFlow(this.fs5_1);
    var tmp_14 = this;
    Companion_getInstance_126();
    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.dqq());
      Companion_getInstance_4();
      tmp_15 = tmp_16.n62(6);
    } else {
      tmp_15 = tmp1_elvis_lhs;
    }
    tmp_14.hs5_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.is5_1 = Instance(this_0, tmp$ret$10, null).a5d(this, createNewClazzUseCase$factory());
    var tmp_19 = this;
    Companion_getInstance_117();
    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.js5_1 = tmp1_elvis_lhs_0 == null ? ClazzAction_EDIT_getInstance() : tmp1_elvis_lhs_0;
    var title = this.tqw(strings_getInstance().qnk_1, this.js5_1.equals(ClazzAction_COPY_getInstance()) ? strings_getInstance().jns_1 : strings_getInstance().snk_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nqp_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_98().cq9_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.vqq(tmp_21, VOID, VOID, ClazzEditViewModel$slambda_2(savedStateHandle, this, null));
  }
  protoOf(ClazzEditViewModel).js9 = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fs5_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.ls5_1;
        var tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.a8e_1;
        var tmp6_clazzEndDateError = this.uqw(tmp, entity == null ? null : entity.a8e_1, prevValue.ns5_1);
        var tmp0_safe_receiver = prevValue.ls5_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z8d_1;
        var tmp7_clazzStartDateError = this.uqw(tmp_0, entity == null ? null : entity.z8d_1, prevValue.ms5_1);
        var tmp4_safe_receiver = prevValue.ls5_1;
        var tmp_1 = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.s8d_1;
        var tmp8_clazzNameError = this.uqw(tmp_1, entity == null ? null : entity.s8d_1, prevValue.os5_1);
        var nextValue = prevValue.ss5(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_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.aqq();
    tmp_2.qqv_1 = launch(tmp_3, VOID, VOID, ClazzEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzEditViewModel).hsk = function (checked) {
    var tmp0_safe_receiver = this.fs5_1.t2().ls5_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy_4(tmp0_safe_receiver, ClazzEditViewModel$onCheckedAttendanceChanged$lambda(checked));
    }
    this.js9(tmp);
  };
  protoOf(ClazzEditViewModel).isk = function () {
    this.rqq('ScheduleEdit', 'Schedule', null, Companion_instance_29.n4r());
  };
  protoOf(ClazzEditViewModel).jsk = function (schedule) {
    this.rqq('ScheduleEdit', 'Schedule', schedule, Companion_instance_29.n4r());
  };
  protoOf(ClazzEditViewModel).ksk = function (schedule) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.fs5_1.t2().ps5_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.zhf_1.equals(schedule.zhf_1)) {
        destination.i1(element);
      }
    }
    var newSchedules = destination;
    this.jqp_1.mql('schedule', this.m4r().r45(ListSerializer(Companion_instance_29.n4r()), newSchedules));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.fs5_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickDeleteSchedule.<anonymous>' call
        var nextValue = prevValue.ss5(VOID, VOID, VOID, VOID, VOID, newSchedules);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzEditViewModel).lsk = function (blockType) {
    if (blockType === 104) {
      Companion_getInstance_170();
      var tmp = Companion_getInstance_13().n4r();
      Companion_getInstance_117();
      var tmp_0 = to('listMode', ListViewMode_PICKER_getInstance().toString());
      Companion_getInstance_117();
      var tmp_1 = to('clazzUid', this.hs5_1.toString());
      Companion_getInstance_175();
      var tmp_2 = to('blockType', (104).toString());
      this.rqq('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_175();
      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_175();
    this_0.s('blockType', blockType.toString());
    Companion_getInstance_117();
    this_0.s('clazzUid', this.hs5_1.toString());
    if (blockType === 103) {
      var tmp0_safe_receiver = this.fs5_1.t2().ls5_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.rqq(viewName, keyName, null, tmp3_serializer, tmp2_args);
  };
  protoOf(ClazzEditViewModel).vsd = function () {
    var tmp0_elvis_lhs = this.fs5_1.t2().ls5_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var initEntity = tmp;
    if (this.mqq().equals(Companion_getInstance_98().cq9_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.fs5_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.ss5(VOID, VOID, this.jqq().vol(strings_getInstance().cmp_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.fs5_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.ss5(VOID, VOID, VOID, this.jqq().vol(strings_getInstance().wnm_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.fs5_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.ss5(VOID, VOID, VOID, VOID, this.jqq().vol(strings_getInstance().gnn_1));
          if (this_3.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    if (hasErrors(this.fs5_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.fs5_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.ss5(VOID, entity);
        if (this_4.y1k(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    var tmp_0 = ClazzEditViewModel$onClickSave$lambda_0(this);
    this.wqw(tmp_0, ClazzEditViewModel$onClickSave$slambda_0(this, entity, initEntity, null));
  };
  protoOf(ClazzEditViewModel).msk = function (from, to) {
    // Inline function 'kotlin.apply' call
    var this_0 = toMutableList(this.fs5_1.t2().qs5_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.bs5_1.spd(reorderedList, to);
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzEditViewModel$onCourseBlockMoved$slambda_0(this, newList, null));
  };
  protoOf(ClazzEditViewModel).nsk = function () {
    Companion_getInstance_117();
    var tmp = to('result_key', 'timeZone');
    Companion_getInstance_117();
    this.lqp_1.wp8('TimeZoneList', mapOf([tmp, to('result_viewname', this.kqp_1)]));
  };
  protoOf(ClazzEditViewModel).osk = function () {
  };
  protoOf(ClazzEditViewModel).psk = function () {
    this.rqq('CourseTerminologyList', 'terminology', null, Companion_instance_34.n4r());
  };
  protoOf(ClazzEditViewModel).qsk = function (block) {
    updateCourseBlock(this, block.eka(block.sk9_1.mkn(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true)));
  };
  protoOf(ClazzEditViewModel).rsk = function (block) {
    updateCourseBlock(this, block.eka(block.sk9_1.mkn(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false)));
  };
  protoOf(ClazzEditViewModel).ssk = function (block) {
    updateCourseBlock(this, block.eka(block.sk9_1.mkn(VOID, VOID, block.sk9_1.v7x_1 + 1 | 0)));
  };
  protoOf(ClazzEditViewModel).tsk = function (block) {
    updateCourseBlock(this, block.eka(block.sk9_1.mkn(VOID, VOID, block.sk9_1.v7x_1 - 1 | 0)));
  };
  protoOf(ClazzEditViewModel).usk = function (block) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzEditViewModel$onClickDeleteCourseBlock$slambda_0(this, block, null));
  };
  protoOf(ClazzEditViewModel).vsk = function (block) {
    var tmp0_subject = block.sk9_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_175();
      var tmp1_nextViewName = 'CourseBlockEdit';
      var tmp2_key = 'courseblock';
      var tmp3_serializer = Companion_getInstance_13().n4r();
      this.rqq(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_117();
        this_0.s('clazzUid', this.hs5_1.toString());
        var tmp0_safe_receiver = this.fs5_1.t2().ls5_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.rqq(tmp4_nextViewName, tmp5_key, block, tmp6_serializer, tmp7_args);
      }
    }
  };
  function CourseBlockUiState(block) {
    this.wsk_1 = block;
  }
  protoOf(CourseBlockUiState).xsk = function () {
    var tmp;
    var tmp_0 = this.wsk_1.sk9_1.u7x_1;
    if (!(tmp_0 === 100)) {
      tmp = this.wsk_1.sk9_1.v7x_1 < 3;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockUiState).ysk = function () {
    return this.wsk_1.sk9_1.v7x_1 > 0;
  };
  protoOf(CourseBlockUiState).zsk = function () {
    return !this.wsk_1.sk9_1.k7y_1;
  };
  protoOf(CourseBlockUiState).asl = function () {
    return this.wsk_1.sk9_1.k7y_1;
  };
  function Companion_118() {
    Companion_instance_167 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.ysi_1 = [null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_8()), new ArrayListSerializer($serializer_getInstance_7()), null];
    this.zsi_1 = 3;
  }
  protoOf(Companion_118).n4r = function () {
    return $serializer_getInstance_73();
  };
  var Companion_instance_167;
  function Companion_getInstance_135() {
    if (Companion_instance_167 == null)
      new Companion_118();
    return Companion_instance_167;
  }
  function $serializer_61() {
    $serializer_instance_61 = 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.bsl_1 = tmp0_serialDesc;
  }
  protoOf($serializer_61).q44 = function () {
    return this.bsl_1;
  };
  protoOf($serializer_61).k4g = function () {
    var tmp0_cached = Companion_getInstance_135().ysi_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_61).s44 = function (decoder) {
    var tmp0_desc = this.bsl_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_135().ysi_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_61).csl = function (encoder, value) {
    var tmp0_desc = this.bsl_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_135().ysi_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.ks5_1 === false)) {
      tmp1_output.o49(tmp0_desc, 0, value.ks5_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.ls5_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, $serializer_getInstance_9(), value.ls5_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.ms5_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.ms5_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.ns5_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.ns5_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.os5_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.os5_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !equals(value.ps5_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 5, tmp2_cached[5], value.ps5_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !equals(value.qs5_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 6, tmp2_cached[6], value.qs5_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.rs5_1 === 'UTC')) {
      tmp1_output.w49(tmp0_desc, 7, value.rs5_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_61).r44 = function (encoder, value) {
    return this.csl(encoder, value instanceof ClazzEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_61;
  function $serializer_getInstance_73() {
    if ($serializer_instance_61 == null)
      new $serializer_61();
    return $serializer_instance_61;
  }
  function ClazzEditUiState_init_$Init$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_73().bsl_1);
    }
    if (0 === (seen1 & 1))
      $this.ks5_1 = false;
    else
      $this.ks5_1 = fieldsEnabled;
    if (0 === (seen1 & 2))
      $this.ls5_1 = null;
    else
      $this.ls5_1 = entity;
    if (0 === (seen1 & 4))
      $this.ms5_1 = null;
    else
      $this.ms5_1 = clazzStartDateError;
    if (0 === (seen1 & 8))
      $this.ns5_1 = null;
    else
      $this.ns5_1 = clazzEndDateError;
    if (0 === (seen1 & 16))
      $this.os5_1 = null;
    else
      $this.os5_1 = clazzNameError;
    if (0 === (seen1 & 32))
      $this.ps5_1 = emptyList();
    else
      $this.ps5_1 = clazzSchedules;
    if (0 === (seen1 & 64))
      $this.qs5_1 = emptyList();
    else
      $this.qs5_1 = courseBlockList;
    if (0 === (seen1 & 128))
      $this.rs5_1 = 'UTC';
    else
      $this.rs5_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_135();
    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.ks5_1 = fieldsEnabled;
    this.ls5_1 = entity;
    this.ms5_1 = clazzStartDateError;
    this.ns5_1 = clazzEndDateError;
    this.os5_1 = clazzNameError;
    this.ps5_1 = clazzSchedules;
    this.qs5_1 = courseBlockList;
    this.rs5_1 = timeZone;
  }
  protoOf(ClazzEditUiState).dsl = function () {
    var tmp;
    var tmp0_safe_receiver = this.ls5_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).esl = function (courseBlockAndEditEntities) {
    return new CourseBlockUiState(courseBlockAndEditEntities);
  };
  protoOf(ClazzEditUiState).fsl = function (fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) {
    return new ClazzEditUiState(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone);
  };
  protoOf(ClazzEditUiState).ss5 = function (fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.ks5_1 : fieldsEnabled;
    entity = entity === VOID ? this.ls5_1 : entity;
    clazzStartDateError = clazzStartDateError === VOID ? this.ms5_1 : clazzStartDateError;
    clazzEndDateError = clazzEndDateError === VOID ? this.ns5_1 : clazzEndDateError;
    clazzNameError = clazzNameError === VOID ? this.os5_1 : clazzNameError;
    clazzSchedules = clazzSchedules === VOID ? this.ps5_1 : clazzSchedules;
    courseBlockList = courseBlockList === VOID ? this.qs5_1 : courseBlockList;
    timeZone = timeZone === VOID ? this.rs5_1 : timeZone;
    return $super === VOID ? this.fsl(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) : $super.fsl.call(this, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone);
  };
  protoOf(ClazzEditUiState).toString = function () {
    return 'ClazzEditUiState(fieldsEnabled=' + this.ks5_1 + ', entity=' + this.ls5_1 + ', clazzStartDateError=' + this.ms5_1 + ', clazzEndDateError=' + this.ns5_1 + ', clazzNameError=' + this.os5_1 + ', clazzSchedules=' + this.ps5_1 + ', courseBlockList=' + this.qs5_1 + ', timeZone=' + this.rs5_1 + ')';
  };
  protoOf(ClazzEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.ks5_1);
    result = imul(result, 31) + (this.ls5_1 == null ? 0 : this.ls5_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ms5_1 == null ? 0 : getStringHashCode(this.ms5_1)) | 0;
    result = imul(result, 31) + (this.ns5_1 == null ? 0 : getStringHashCode(this.ns5_1)) | 0;
    result = imul(result, 31) + (this.os5_1 == null ? 0 : getStringHashCode(this.os5_1)) | 0;
    result = imul(result, 31) + hashCode(this.ps5_1) | 0;
    result = imul(result, 31) + hashCode(this.qs5_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.rs5_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.ks5_1 === tmp0_other_with_cast.ks5_1))
      return false;
    if (!equals(this.ls5_1, tmp0_other_with_cast.ls5_1))
      return false;
    if (!(this.ms5_1 == tmp0_other_with_cast.ms5_1))
      return false;
    if (!(this.ns5_1 == tmp0_other_with_cast.ns5_1))
      return false;
    if (!(this.os5_1 == tmp0_other_with_cast.os5_1))
      return false;
    if (!equals(this.ps5_1, tmp0_other_with_cast.ps5_1))
      return false;
    if (!equals(this.qs5_1, tmp0_other_with_cast.qs5_1))
      return false;
    if (!(this.rs5_1 === tmp0_other_with_cast.rs5_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$68(_this__u8e3s4, params, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.osl_1 = _this__u8e3s4;
    this.psl_1 = params;
  }
  protoOf($loadCOROUTINE$68).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.osl_1.j6c();
            this.hd_1 = 1;
            suspendResult = this.osl_1.wsl_1.p54(this.psl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qsl_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = this.osl_1.xsl_1.j7e();
            var tmp_1 = this.qsl_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.sjf(this.osl_1.ysl_1, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs, this.osl_1.zsl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var blockResults = suspendResult;
            var tmp3_subject = this.qsl_1;
            var tmp_3;
            if (tmp3_subject instanceof Page) {
              var tmp_4 = this.qsl_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.qsl_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$69(_this__u8e3s4, params, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ism_1 = _this__u8e3s4;
    this.jsm_1 = params;
  }
  protoOf($loadHttpCOROUTINE$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 tmp_1 = this.ism_1.wsl_1;
            tmp_0.ksm_1 = isInterface(tmp_1, PagingSourceWithHttpLoader) ? tmp_1 : null;
            if (this.ksm_1 == null) {
              this.lsm_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.ksm_1.y6e(this.jsm_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.lsm_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp1_elvis_lhs = this.lsm_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.wsl_1 = studentListPagingSource;
    this.xsl_1 = db;
    this.ysl_1 = clazzUid;
    this.zsl_1 = accountPersonUid;
  }
  protoOf(ClazzGradebookPagingSource).msm = function (params, $completion) {
    var tmp = new $loadCOROUTINE$68(this, params, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookPagingSource).p54 = function (params, $completion) {
    return this.msm(params, $completion);
  };
  protoOf(ClazzGradebookPagingSource).x6e = function (params, $completion) {
    var tmp = new $loadHttpCOROUTINE$69(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.vsm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).xsm = function (courseBlockList, $completion) {
    var tmp = this.ysm(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.xsm((!(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.vsm_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.fso(this.wsm_1, this.vsm_1.aso_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).ysm = function (courseBlockList, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this.vsm_1, completion);
    i.wsm_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.xsm(courseBlockList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.oso_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).wri = function (it, $completion) {
    var tmp = this.xri(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.wri((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.oso_1.nqp_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vq8(VOID, VOID, this.pso_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).xri = function (it, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this.oso_1, completion);
    i.pso_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.wri(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.yso_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.yso_1.fqq().p7d().ocl(this.yso_1.zsn_1));
            var tmp_1 = ClazzGradebookViewModel$slambda$slambda$slambda$slambda_0(this.yso_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.yso_1, completion);
    i.zso_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.isp_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.isp_1.fqq().o7d().b8d(this.isp_1.zsn_1));
            var tmp_1 = ClazzGradebookViewModel$slambda$slambda$slambda$slambda_2(this.isp_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.isp_1, completion);
    i.jsp_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.ssp_1 = $this_launch;
    this.tsp_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.ssp_1, VOID, VOID, ClazzGradebookViewModel$slambda$slambda$slambda_0(this.tsp_1, null));
          launch(this.ssp_1, VOID, VOID, ClazzGradebookViewModel$slambda$slambda$slambda_2(this.tsp_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.ssp_1, this.tsp_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_119() {
    this.usp_1 = 'Gradebook';
  }
  var Companion_instance_168;
  function Companion_getInstance_136() {
    return Companion_instance_168;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_11(function_0) {
    this.vsp_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_11).t1d = function (value, $completion) {
    return this.vsp_1(value, $completion);
  };
  function ClazzGradebookViewModel$studentPagingSource$lambda(this$0) {
    return function () {
      var tmp = this$0.fqq().t7d();
      return new ClazzGradebookPagingSource(tmp.k93(this$0.zsn_1, 1000, 1, '%', 0, this$0.bqq(), systemTimeInMillis()), this$0.dqq(), this$0.zsn_1, this$0.bqq());
    };
  }
  function ClazzGradebookViewModel$slambda(this$0, resultContinuation) {
    this.esq_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.esq_1.eqy_1, ClazzGradebookViewModel$slambda$slambda_0(this.fsq_1, this.esq_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.esq_1, completion);
    i.fsq_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_126();
    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.zsn_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.aso_1 = ClazzGradebookViewModel$studentPagingSource$lambda(this);
    var tmp_2 = this.aqq();
    launch(tmp_2, VOID, VOID, ClazzGradebookViewModel$slambda_0(this, null));
  }
  protoOf(ClazzGradebookViewModel).yqy = function (searchText) {
  };
  protoOf(ClazzGradebookViewModel).zqy = 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.bso_1 = courseBlocks;
    this.cso_1 = results;
    this.dso_1 = isFullScreen;
    this.eso_1 = scale;
  }
  protoOf(ClazzGradebookUiState).gsq = function (courseBlocks, results, isFullScreen, scale) {
    return new ClazzGradebookUiState(courseBlocks, results, isFullScreen, scale);
  };
  protoOf(ClazzGradebookUiState).fso = function (courseBlocks, results, isFullScreen, scale, $super) {
    courseBlocks = courseBlocks === VOID ? this.bso_1 : courseBlocks;
    results = results === VOID ? this.cso_1 : results;
    isFullScreen = isFullScreen === VOID ? this.dso_1 : isFullScreen;
    scale = scale === VOID ? this.eso_1 : scale;
    return $super === VOID ? this.gsq(courseBlocks, results, isFullScreen, scale) : $super.gsq.call(this, courseBlocks, results, isFullScreen, scale);
  };
  protoOf(ClazzGradebookUiState).toString = function () {
    return 'ClazzGradebookUiState(courseBlocks=' + this.bso_1 + ', results=' + this.cso_1 + ', isFullScreen=' + this.dso_1 + ', scale=' + this.eso_1 + ')';
  };
  protoOf(ClazzGradebookUiState).hashCode = function () {
    var result = hashCode(this.bso_1);
    result = imul(result, 31) + hashCode(this.cso_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dso_1) | 0;
    result = imul(result, 31) + getNumberHashCode(this.eso_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.bso_1, tmp0_other_with_cast.bso_1))
      return false;
    if (!equals(this.cso_1, tmp0_other_with_cast.cso_1))
      return false;
    if (!(this.dso_1 === tmp0_other_with_cast.dso_1))
      return false;
    if (!equals(this.eso_1, tmp0_other_with_cast.eso_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.psq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).rsq = function (inviteAndClazz, $completion) {
    var tmp = this.ssq(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.rsq((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.psq_1.nqp_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              var tmp0_safe_receiver = this.qsq_1;
              if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p9n_1) == null)) {
                tmp_0 = Companion_getInstance_98().dq9_1;
              } else {
                tmp_0 = Companion_getInstance_98().cq9_1;
              }
              var nextValue = prevValue.vq8(VOID, tmp_0);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.psq_1.osr_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_0 = this.qsq_1;
              var nextValue_0 = prevValue_0.vsr(this.qsq_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).ssq = function (inviteAndClazz, completion) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda(this.psq_1, completion);
    i.qsq_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.rsq(inviteAndClazz, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda(this$0, resultContinuation) {
    this.ess_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.ess_1.fqq().e7g().k9m(this.ess_1.rsr_1);
            var tmp_1 = ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda_0(this.ess_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.ess_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.qsr_1;
    clazzInviteRedeemUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_120() {
    this.fss_1 = 'ClazzInviteRedeem';
  }
  var Companion_instance_169;
  function Companion_getInstance_137() {
    return Companion_instance_169;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_12(function_0) {
    this.gss_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_12).t1d = function (value, $completion) {
    return this.gss_1(value, $completion);
  };
  function ClazzInviteRedeemViewModel$lambda$slambda(this$0, resultContinuation) {
    this.pss_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.pss_1.osr_1, ClazzInviteRedeemViewModel$lambda$slambda$slambda_0(this.pss_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.pss_1, completion);
    i.qss_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.nqp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteredeem.ClazzInviteRedeemViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.vq8(VOID, VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      var tmp = this$0.aqq();
      launch(tmp, VOID, VOID, ClazzInviteRedeemViewModel$lambda$slambda_0(this$0, null));
      return Unit_instance;
    };
  }
  function ClazzInviteRedeemViewModel$processDecision$slambda(this$0, $isAccepting, resultContinuation) {
    this.zss_1 = this$0;
    this.ast_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.zss_1.osr_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.vsr(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.zss_1).upi(this.zss_1.rsr_1, this.ast_1, this.zss_1.zqp().toc().cl0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            this.zss_1.hqq().kq9(new Snack(result.vpi_1));
            Companion_getInstance_141();
            this.zss_1.lqp_1.uqb('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.zss_1.osr_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var tmp0_errorText = stringResourceOrMessage(e, this.zss_1.jqq());
                  var nextValue_0 = prevValue_0.vsr(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.zss_1, this.ast_1, completion);
    i.bst_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.osr_1 = MutableStateFlow(new ClazzInviteRedeemUiState());
    this.psr_1 = asStateFlow(this.osr_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.qsr_1 = Instance(this_0, tmp$ret$0, null).a5d(this, clazzInviteRedeemUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_126();
    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.rsr_1 = tmp_2;
    Companion_getInstance_126();
    var tmp_3 = mapOf_0(to('inviteCode', this.rsr_1));
    this.yqq(false, tmp_3, ClazzInviteRedeemViewModel$lambda(this));
  }
  protoOf(ClazzInviteRedeemViewModel).cst = function (isAccepting) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.aqq();
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteredeem.ClazzInviteRedeemViewModel.processDecision.<anonymous>' call
    if (this.osr_1.t2().tsr_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.ssr_1 = clazzInvite;
    this.tsr_1 = enabled;
    this.usr_1 = errorText;
  }
  protoOf(ClazzInviteRedeemUiState).dst = function () {
    var tmp0_safe_receiver = this.ssr_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).est = function () {
    var tmp;
    if (this.tsr_1) {
      var tmp0_safe_receiver = this.ssr_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).fst = function () {
    var tmp;
    var tmp0_safe_receiver = this.ssr_1;
    if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p9n_1) == null)) {
      var tmp1_safe_receiver = this.ssr_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).gst = function (clazzInvite, enabled, errorText) {
    return new ClazzInviteRedeemUiState(clazzInvite, enabled, errorText);
  };
  protoOf(ClazzInviteRedeemUiState).vsr = function (clazzInvite, enabled, errorText, $super) {
    clazzInvite = clazzInvite === VOID ? this.ssr_1 : clazzInvite;
    enabled = enabled === VOID ? this.tsr_1 : enabled;
    errorText = errorText === VOID ? this.usr_1 : errorText;
    return $super === VOID ? this.gst(clazzInvite, enabled, errorText) : $super.gst.call(this, clazzInvite, enabled, errorText);
  };
  protoOf(ClazzInviteRedeemUiState).toString = function () {
    return 'ClazzInviteRedeemUiState(clazzInvite=' + this.ssr_1 + ', enabled=' + this.tsr_1 + ', errorText=' + this.usr_1 + ')';
  };
  protoOf(ClazzInviteRedeemUiState).hashCode = function () {
    var result = this.ssr_1 == null ? 0 : this.ssr_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.tsr_1) | 0;
    result = imul(result, 31) + (this.usr_1 == null ? 0 : getStringHashCode(this.usr_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.ssr_1, tmp0_other_with_cast.ssr_1))
      return false;
    if (!(this.tsr_1 === tmp0_other_with_cast.tsr_1))
      return false;
    if (!(this.usr_1 == tmp0_other_with_cast.usr_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.csu_1;
    parseInviteUseCase$factory_0();
    return this_0.t2();
  }
  function _get_sendClazzInvitesUseCase__utu0z8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dsu_1;
    sendClazzInvitesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_hideKeyboardUseCase__8r7d6l($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.isu_1;
    hideKeyboardUseCase$factory_0();
    return this_0.t2();
  }
  function sendContactsToServer($this, contacts, $completion) {
    var tmp = new $sendContactsToServerCOROUTINE$70($this, contacts, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_121() {
    this.usu_1 = 'invite_via_contact';
    this.vsu_1 = 'person_role';
    this.wsu_1 = 'clazz_uid';
  }
  var Companion_instance_170;
  function Companion_getInstance_138() {
    return Companion_instance_170;
  }
  function ClazzInviteViaContactViewModel$onClickSend$ref($boundThis) {
    var l = function () {
      $boundThis.xsu();
      return Unit_instance;
    };
    l.callableName = 'onClickSend';
    return l;
  }
  function ClazzInviteViaContactViewModel$onClickSend$slambda(this$0, resultContinuation) {
    this.gsv_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.gsv_1);
            if (tmp0_safe_receiver == null)
              null;
            else {
              tmp0_safe_receiver.dph();
            }

            this.isv_1 = this.gsv_1.gsu_1.t2().msv_1;
            if (this.isv_1.c1()) {
              this.jsv_1 = this.gsv_1.gsu_1.t2().nsv_1;
              var this_0 = this.jsv_1;
              if (!(this_0 == null ? true : isBlank(this_0))) {
                this.ksv_1 = _get_parseInviteUseCase__fcfumo(this.gsv_1).zpb(this.jsv_1);
                this.hd_1 = 4;
                suspendResult = sendContactsToServer(this.gsv_1, this.ksv_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.gsv_1, this.isv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            var noContactFoundMessage = this.gsv_1.jqq().vol(strings_getInstance().rns_1);
            l$ret$1: do {
              var this_1 = this.gsv_1.gsu_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.osv(noContactFoundMessage);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.gsv_1.psv(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.gsv_1, completion);
    i.hsv_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$70(_this__u8e3s4, contacts, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.rsu_1 = _this__u8e3s4;
    this.ssu_1 = contacts;
  }
  protoOf($sendContactsToServerCOROUTINE$70).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.ssu_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (element.rsv_1) {
                destination.i1(element);
              }
            }

            tmp_0.tsu_1 = destination;
            if (this.tsu_1.c1()) {
              var noValidContactFoundMessage = this.rsu_1.jqq().vol(strings_getInstance().qns_1);
              l$ret$1: do {
                var this_1 = this.rsu_1.gsu_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.osv(noValidContactFoundMessage);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.rsu_1.psv(noValidContactFoundMessage);
              return Unit_instance;
            }

            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_1 = _get_sendClazzInvitesUseCase__utu0z8(this.rsu_1);
            var this_2 = this.tsu_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.qsv_1);
            }

            suspendResult = tmp_1.vpj(new SendClazzInvitesRequest(destination_0, this.rsu_1.esu_1, this.rsu_1.fsu_1, this.rsu_1.zqp().eoc().znw_1.f96_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.rsu_1.hqq().kq9(new Snack(this.rsu_1.jqq().vol(strings_getInstance().rnt_1)));
            Companion_getInstance_206();
            this.rsu_1.lqp_1.vqb('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.rsu_1.hqq();
              var tmp_4 = this.rsu_1.jqq().vol(strings_getInstance().xmj_1);
              var tmp0_elvis_lhs = e.message;
              tmp_3.kq9(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.csu_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.dsu_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.esu_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.fsu_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    this.gsu_1 = MutableStateFlow(new ClazzInviteViaContactUiState());
    this.hsu_1 = asStateFlow(this.gsu_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.isu_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(this, hideKeyboardUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nqp_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.jqq().vol(strings_getInstance().mns_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.nqp_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.<anonymous>' call
        var tmp_7 = this.jqq().vol(strings_getInstance().gmn_1);
        var nextValue_0 = prevValue_0.vq8(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).xsu = function () {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzInviteViaContactViewModel$onClickSend$slambda_0(this, null));
  };
  protoOf(ClazzInviteViaContactViewModel).psv = function (error) {
    this.hqq().kq9(new Snack(error));
  };
  protoOf(ClazzInviteViaContactViewModel).tsv = function (text) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.gsu_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onClickChipSubmit.<anonymous>' call
        var nextValue = prevValue.osv(VOID, plus(prevValue.msv_1, _get_parseInviteUseCase__fcfumo(this).zpb(text)));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    return last(tmp$ret$1.msv_1);
  };
  protoOf(ClazzInviteViaContactViewModel).usv = function (removedChipTexts) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.gsu_1.t2().msv_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.qsv_1)) {
        destination.i1(element);
      }
    }
    var newChips = destination;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.gsu_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onChipsRemoved.<anonymous>' call
        var nextValue = prevValue.osv(VOID, newChips);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzInviteViaContactViewModel).vsv = function (newValue) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gsu_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onTextFieldValueChanged.<anonymous>' call
        var nextValue = prevValue.osv(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.lsv_1 = contactError;
    this.msv_1 = chips;
    this.nsv_1 = textFieldValue;
  }
  protoOf(ClazzInviteViaContactUiState).wsv = function (contactError, chips, textFieldValue) {
    return new ClazzInviteViaContactUiState(contactError, chips, textFieldValue);
  };
  protoOf(ClazzInviteViaContactUiState).osv = function (contactError, chips, textFieldValue, $super) {
    contactError = contactError === VOID ? this.lsv_1 : contactError;
    chips = chips === VOID ? this.msv_1 : chips;
    textFieldValue = textFieldValue === VOID ? this.nsv_1 : textFieldValue;
    return $super === VOID ? this.wsv(contactError, chips, textFieldValue) : $super.wsv.call(this, contactError, chips, textFieldValue);
  };
  protoOf(ClazzInviteViaContactUiState).toString = function () {
    return 'ClazzInviteViaContactUiState(contactError=' + this.lsv_1 + ', chips=' + this.msv_1 + ', textFieldValue=' + this.nsv_1 + ')';
  };
  protoOf(ClazzInviteViaContactUiState).hashCode = function () {
    var result = this.lsv_1 == null ? 0 : getStringHashCode(this.lsv_1);
    result = imul(result, 31) + hashCode(this.msv_1) | 0;
    result = imul(result, 31) + (this.nsv_1 == null ? 0 : getStringHashCode(this.nsv_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.lsv_1 == tmp0_other_with_cast.lsv_1))
      return false;
    if (!equals(this.msv_1, tmp0_other_with_cast.msv_1))
      return false;
    if (!(this.nsv_1 == tmp0_other_with_cast.nsv_1))
      return false;
    return true;
  };
  function InviteViaContactChip(text, isValid, inviteType) {
    this.qsv_1 = text;
    this.rsv_1 = isValid;
    this.ssv_1 = inviteType;
  }
  protoOf(InviteViaContactChip).toString = function () {
    return 'InviteViaContactChip(text=' + this.qsv_1 + ', isValid=' + this.rsv_1 + ', inviteType=' + this.ssv_1 + ')';
  };
  protoOf(InviteViaContactChip).hashCode = function () {
    var result = getStringHashCode(this.qsv_1);
    result = imul(result, 31) + getBooleanHashCode(this.rsv_1) | 0;
    result = imul(result, 31) + this.ssv_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.qsv_1 === tmp0_other_with_cast.qsv_1))
      return false;
    if (!(this.rsv_1 === tmp0_other_with_cast.rsv_1))
      return false;
    if (!(this.ssv_1 === tmp0_other_with_cast.ssv_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.usw_1;
    makeLinkUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setClipboardStringUseCase__31i1s1_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wsw_1;
    setClipboardStringUseCase$factory_2();
    return this_0.t2();
  }
  function _get_shareTextUseCase__god44g($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xsw_1;
    shareTextUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_122() {
    this.zsw_1 = 'InviteWithLink';
  }
  var Companion_instance_171;
  function Companion_getInstance_139() {
    return Companion_instance_171;
  }
  function ClazzInviteViaLinkViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'InviteWithLink');
    this.ssw_1 = MutableStateFlow(new ClazzInviteViaLinkUiState());
    this.tsw_1 = asStateFlow(this.ssw_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.usw_1 = Instance(this_0, tmp$ret$0, null).a5d(this, makeLinkUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_126();
    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.vsw_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.wsw_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.xsw_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(this, shareTextUseCase$factory());
    var tmp_7 = this;
    var tmp_8 = _get_makeLinkUseCase__qbv742(this);
    Companion_getInstance_126();
    tmp_7.ysw_1 = tmp_8.wpk('JoinWithCode', mapOf_0(to('inviteCode', this.vsw_1)));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nqp_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.invitevialink.ClazzInviteViaLinkViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, this.jqq().vol(strings_getInstance().hna_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.ssw_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.csx(this.ysw_1, !(_get_shareTextUseCase__god44g(this) == null));
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ClazzInviteViaLinkViewModel).dsx = function () {
    _get_setClipboardStringUseCase__31i1s1_0(this).bp4(this.ysw_1);
    this.hqq().kq9(new Snack(this.jqq().vol(strings_getInstance().cna_1)));
  };
  function ClazzInviteViaLinkUiState(inviteLink, showShareLinkButton) {
    inviteLink = inviteLink === VOID ? null : inviteLink;
    showShareLinkButton = showShareLinkButton === VOID ? false : showShareLinkButton;
    this.asx_1 = inviteLink;
    this.bsx_1 = showShareLinkButton;
  }
  protoOf(ClazzInviteViaLinkUiState).csx = function (inviteLink, showShareLinkButton) {
    return new ClazzInviteViaLinkUiState(inviteLink, showShareLinkButton);
  };
  protoOf(ClazzInviteViaLinkUiState).toString = function () {
    return 'ClazzInviteViaLinkUiState(inviteLink=' + this.asx_1 + ', showShareLinkButton=' + this.bsx_1 + ')';
  };
  protoOf(ClazzInviteViaLinkUiState).hashCode = function () {
    var result = this.asx_1 == null ? 0 : getStringHashCode(this.asx_1);
    result = imul(result, 31) + getBooleanHashCode(this.bsx_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.asx_1 == tmp0_other_with_cast.asx_1))
      return false;
    if (!(this.bsx_1 === tmp0_other_with_cast.bsx_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.bsy_1;
    requestEnrolmentUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_123() {
    this.csy_1 = 'JoinWithCode';
  }
  var Companion_instance_172;
  function Companion_getInstance_140() {
    return Companion_instance_172;
  }
  function JoinWithCodeViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.nqp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.vq8(VOID, VOID, this$0.jqq().vol(strings_getInstance().rnk_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.zsx_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.onClickJoin.<anonymous>.<anonymous>' call
          var nextValue = prevValue.gsy(VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function JoinWithCodeViewModel$onClickJoin$slambda(this$0, resultContinuation) {
    this.psy_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.psy_1);
            var tmp_1 = this.psy_1.zsx_1.t2().esy_1;
            var tmp_2 = this.psy_1.zqp().eoc().znw_1;
            suspendResult = tmp_0.ap4(tmp_1, tmp_2, 1000, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.psy_1.hqq().kq9(new Snack(this.psy_1.jqq().vol(strings_getInstance().rno_1)));
            if (!(this.psy_1.kqq() == null)) {
              this.psy_1.uqv(null);
            } else {
              Companion_getInstance_141();
              this.psy_1.lqp_1.uqb('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().xnp_1;
              } else {
                if (e instanceof AlreadyHasPendingRequestException) {
                  tmp_4 = strings_getInstance().qno_1;
                } else {
                  if (e instanceof AlreadyEnroledInClassException) {
                    tmp_4 = strings_getInstance().dnc_1;
                  } else {
                    tmp_4 = strings_getInstance().xmj_1;
                  }
                }
              }
              var errorMessage = tmp_4;
              l$ret$1: do {
                var this_0 = this.psy_1.zsx_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_5 = this.psy_1.jqq().vol(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.gsy(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.psy_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_126();
    var tmp0_elvis_lhs = savedStateHandle.ba('inviteCode');
    tmp.zsx_1 = MutableStateFlow(new JoinWithCodeUiState(VOID, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs));
    this.asy_1 = asStateFlow(this.zsx_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.bsy_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_126();
    this.wqq(this_1, 'inviteCode');
    var tmp_2 = this_1.f3();
    this.zqq(VOID, tmp_2, JoinWithCodeViewModel$lambda(this));
  }
  protoOf(JoinWithCodeViewModel).qsy = function (codeVal) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.zsx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.onCodeValueChange.<anonymous>' call
        var nextValue = prevValue.gsy(null, codeVal);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(JoinWithCodeViewModel).rsy = function () {
    var tmp = JoinWithCodeViewModel$onClickJoin$lambda(this);
    this.wqw(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.dsy_1 = codeError;
    this.esy_1 = code;
    this.fsy_1 = fieldsEnabled;
  }
  protoOf(JoinWithCodeUiState).ssy = function (codeError, code, fieldsEnabled) {
    return new JoinWithCodeUiState(codeError, code, fieldsEnabled);
  };
  protoOf(JoinWithCodeUiState).gsy = function (codeError, code, fieldsEnabled, $super) {
    codeError = codeError === VOID ? this.dsy_1 : codeError;
    code = code === VOID ? this.esy_1 : code;
    fieldsEnabled = fieldsEnabled === VOID ? this.fsy_1 : fieldsEnabled;
    return $super === VOID ? this.ssy(codeError, code, fieldsEnabled) : $super.ssy.call(this, codeError, code, fieldsEnabled);
  };
  protoOf(JoinWithCodeUiState).toString = function () {
    return 'JoinWithCodeUiState(codeError=' + this.dsy_1 + ', code=' + this.esy_1 + ', fieldsEnabled=' + this.fsy_1 + ')';
  };
  protoOf(JoinWithCodeUiState).hashCode = function () {
    var result = this.dsy_1 == null ? 0 : getStringHashCode(this.dsy_1);
    result = imul(result, 31) + getStringHashCode(this.esy_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fsy_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.dsy_1 == tmp0_other_with_cast.dsy_1))
      return false;
    if (!(this.esy_1 === tmp0_other_with_cast.esy_1))
      return false;
    if (!(this.fsy_1 === tmp0_other_with_cast.fsy_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.bsz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda$slambda).uqh = function (hasPermission, $completion) {
    var tmp = this.vqh(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.uqh((!(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.bsz_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_newClazzListOptionVisible = this.csz_1 ? this.bsz_1.jqy().equals(ListViewMode_PICKER_getInstance()) : false;
              var nextValue = prevValue.osz(tmp0_newClazzListOptionVisible, VOID, VOID, VOID, VOID, VOID, this.csz_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).vqh = function (hasPermission, completion) {
    var i = new ClazzListViewModel$slambda$slambda$slambda(this.bsz_1, completion);
    i.csz_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.uqh(hasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.xsz_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.xsz_1.fqq().p7f();
            var tmp_1 = this.xsz_1.zqp().toc().cl0_1;
            PermissionFlags_getInstance();
            var tmp_2 = distinctUntilChanged(tmp_0.zi1(tmp_1, new Long(512, 0)));
            var tmp_3 = ClazzListViewModel$slambda$slambda$slambda_0(this.xsz_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.xsz_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.gt0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).it0 = function (it, $completion) {
    var tmp = this.jt0(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.it0((!(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.gt0_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.osz(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ht0_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).jt0 = function (it, completion) {
    var i = new ClazzListViewModel$slambda$slambda$slambda_1(this.gt0_1, completion);
    i.ht0_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.it0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.st0_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.st0_1.fqq().n7f();
            var tmp_1 = this.st0_1.bqq();
            var tmp_2 = tmp_0.tex(tmp_1, 1);
            var tmp_3 = ClazzListViewModel$slambda$slambda$slambda_2(this.st0_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.st0_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_124() {
    Companion_instance_173 = this;
    this.tt0_1 = 'CourseList';
    this.ut0_1 = 'CourseListHome';
    this.vt0_1 = listOf(['CourseList', 'CourseListHome']);
    this.wt0_1 = 'excludeAlreadySelectedClazzList';
  }
  var Companion_instance_173;
  function Companion_getInstance_141() {
    if (Companion_instance_173 == null)
      new Companion_124();
    return Companion_instance_173;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_13(function_0) {
    this.xt0_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_13).t1d = function (value, $completion) {
    return this.xt0_1(value, $completion);
  };
  function ClazzListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().o7d().w8c(toQueryLikeParam(this$0.nqp_1.t2().nq8_1.cq8_1), this$0.zqp().toc().cl0_1, this$0.yt1_1, this$0.eqy_1.t2().gsz_1.cqf_1, this$0.eqy_1.t2().isz_1, systemTimeInMillis(), this$0.zt1_1);
    };
  }
  function ClazzListViewModel$slambda(this$0, resultContinuation) {
    this.jt2_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.jt2_1.eqy_1, ClazzListViewModel$slambda$slambda_0(this.jt2_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.jt2_1, completion);
    i.kt2_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.tt2_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.tt2_1.eqy_1, ClazzListViewModel$slambda$slambda_2(this.tt2_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.tt2_1, completion);
    i.ut2_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.dt3_1 = this$0;
    this.et3_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.dt3_1.fqq().n7f();
            var tmp_1 = this.et3_1.key_1;
            suspendResult = tmp_0.uex(tmp_1, 4, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.dt3_1.hqq().kq9(new Snack(this.dt3_1.jqq().vol(strings_getInstance().sno_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.dt3_1, this.et3_1, completion);
    i.ft3_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_141();
    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.yt1_1 = tmp_2;
    var tmp_3 = this;
    Companion_getInstance_117();
    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.zt1_1 = tmp_4;
    var tmp_5 = this;
    tmp_5.at2_1 = ClazzListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>' call
        var tmp0_searchState = this.nqz();
        var tmp1_title = this.vqz(strings_getInstance().dnk_1, strings_getInstance().dnk_1);
        var tmp2_fabState = this.qqz(!this.bqq().equals(new Long(0, 0)), strings_getInstance().enk_1);
        var nextValue = prevValue.vq8(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.eqy_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.jqq().vol(get_dayStringResource(element_0));
          result.s(element_0, tmp$ret$11);
        }
        var tmp1_clazzList = this.at2_1;
        var nextValue_0 = prevValue_0.osz(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.aqq();
    launch(tmp_6, VOID, VOID, ClazzListViewModel$slambda_0(this, null));
    var tmp_7 = this.aqq();
    launch(tmp_7, VOID, VOID, ClazzListViewModel$slambda_2(this, null));
  }
  protoOf(ClazzListViewModel).yqy = function (searchText) {
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).zqy = function () {
    this.sqz('CourseEdit');
  };
  protoOf(ClazzListViewModel).gt3 = function () {
    Companion_getInstance_117();
    Companion_getInstance_4();
    this.lqp_1.wp8('JoinWithCode', mapOf_0(to('argCodeTable', (6).toString())));
  };
  protoOf(ClazzListViewModel).ht3 = function (entry) {
    this.uqz('Course', entry.r8d_1, entry);
  };
  protoOf(ClazzListViewModel).it3 = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.osz(VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).jt3 = function (filterOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.onClickFilterChip.<anonymous>' call
        var nextValue = prevValue.osz(VOID, VOID, VOID, VOID, VOID, filterOption.yq9_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).kt3 = function (enrolmentRequest) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzListViewModel$onClickCancelEnrolmentRequest$slambda_0(this, enrolmentRequest, null));
  };
  function Companion_125() {
    Companion_instance_174 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().wml_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().wml_1;
    var tmp_3 = new SortOrderOption(tmp_2, 2, false);
    var tmp_4 = strings_getInstance().smm_1;
    var tmp_5 = new SortOrderOption(tmp_4, 3, true);
    var tmp_6 = strings_getInstance().smm_1;
    tmp.lt3_1 = listOf([tmp_1, tmp_3, tmp_5, new SortOrderOption(tmp_6, 4, false)]);
  }
  var Companion_instance_174;
  function Companion_getInstance_142() {
    if (Companion_instance_174 == null)
      new Companion_125();
    return Companion_instance_174;
  }
  function ClazzListUiState$_init_$lambda_r0y0x0() {
    return new EmptyPagingSource();
  }
  function ClazzListUiState(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) {
    Companion_getInstance_142();
    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_142().lt3_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().tnk_1;
      tmp_1 = listOf([new MessageIdOption2(tmp_2, 5), new MessageIdOption2(strings_getInstance().gn1_1, 0)]);
    } else {
      tmp_1 = filterOptions;
    }
    filterOptions = tmp_1;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.fmf(), Companion_getInstance_9().emj()) : localDateTimeNow;
    this.dsz_1 = newClazzListOptionVisible;
    this.esz_1 = clazzList;
    this.fsz_1 = sortOptions;
    this.gsz_1 = activeSortOrderOption;
    this.hsz_1 = fieldsEnabled;
    this.isz_1 = selectedChipId;
    this.jsz_1 = canAddNewCourse;
    this.ksz_1 = pendingEnrolments;
    this.lsz_1 = filterOptions;
    this.msz_1 = dayOfWeekStrings;
    this.nsz_1 = localDateTimeNow;
  }
  protoOf(ClazzListUiState).mt3 = 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).osz = function (newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow, $super) {
    newClazzListOptionVisible = newClazzListOptionVisible === VOID ? this.dsz_1 : newClazzListOptionVisible;
    clazzList = clazzList === VOID ? this.esz_1 : clazzList;
    sortOptions = sortOptions === VOID ? this.fsz_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? this.gsz_1 : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? this.hsz_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.isz_1 : selectedChipId;
    canAddNewCourse = canAddNewCourse === VOID ? this.jsz_1 : canAddNewCourse;
    pendingEnrolments = pendingEnrolments === VOID ? this.ksz_1 : pendingEnrolments;
    filterOptions = filterOptions === VOID ? this.lsz_1 : filterOptions;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.msz_1 : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.nsz_1 : localDateTimeNow;
    return $super === VOID ? this.mt3(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) : $super.mt3.call(this, newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow);
  };
  protoOf(ClazzListUiState).toString = function () {
    return 'ClazzListUiState(newClazzListOptionVisible=' + this.dsz_1 + ', clazzList=' + this.esz_1 + ', sortOptions=' + this.fsz_1 + ', activeSortOrderOption=' + this.gsz_1 + ', fieldsEnabled=' + this.hsz_1 + ', selectedChipId=' + this.isz_1 + ', canAddNewCourse=' + this.jsz_1 + ', pendingEnrolments=' + this.ksz_1 + ', filterOptions=' + this.lsz_1 + ', dayOfWeekStrings=' + this.msz_1 + ', localDateTimeNow=' + this.nsz_1 + ')';
  };
  protoOf(ClazzListUiState).hashCode = function () {
    var result = getBooleanHashCode(this.dsz_1);
    result = imul(result, 31) + hashCode(this.esz_1) | 0;
    result = imul(result, 31) + hashCode(this.fsz_1) | 0;
    result = imul(result, 31) + this.gsz_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hsz_1) | 0;
    result = imul(result, 31) + this.isz_1 | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jsz_1) | 0;
    result = imul(result, 31) + hashCode(this.ksz_1) | 0;
    result = imul(result, 31) + hashCode(this.lsz_1) | 0;
    result = imul(result, 31) + hashCode(this.msz_1) | 0;
    result = imul(result, 31) + this.nsz_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.dsz_1 === tmp0_other_with_cast.dsz_1))
      return false;
    if (!equals(this.esz_1, tmp0_other_with_cast.esz_1))
      return false;
    if (!equals(this.fsz_1, tmp0_other_with_cast.fsz_1))
      return false;
    if (!this.gsz_1.equals(tmp0_other_with_cast.gsz_1))
      return false;
    if (!(this.hsz_1 === tmp0_other_with_cast.hsz_1))
      return false;
    if (!(this.isz_1 === tmp0_other_with_cast.isz_1))
      return false;
    if (!(this.jsz_1 === tmp0_other_with_cast.jsz_1))
      return false;
    if (!equals(this.ksz_1, tmp0_other_with_cast.ksz_1))
      return false;
    if (!equals(this.lsz_1, tmp0_other_with_cast.lsz_1))
      return false;
    if (!equals(this.msz_1, tmp0_other_with_cast.msz_1))
      return false;
    if (!this.nsz_1.equals(tmp0_other_with_cast.nsz_1))
      return false;
    return true;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).xt3 = function (entity, permissions, $completion) {
    var tmp = this.yt3(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.xt3(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.vt3_1;
          var tmp_0;
          if (this.wt3_1.hdn_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return new Pair(tmp_0, this.wt3_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).yt3 = function (entity, permissions, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.vt3_1 = entity;
    i.wt3_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.xt3(entity, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.ht4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).ot4 = function (it, $completion) {
    var tmp = this.pt4(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.ot4(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.jt4_1 = this.it4_1;
            this.kt4_1 = this.jt4_1.y6();
            this.lt4_1 = this.jt4_1.z6();
            this.mt4_1 = this.lt4_1;
            this.nt4_1 = this.mt4_1.z6();
            l$ret$1: do {
              var this_0 = this.ht4_1.mt5_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (!(this.kt4_1 == null)) {
                  tmp_0 = CoursePermissionConstants_getInstance().vrj_1;
                } else {
                  tmp_0 = emptyList();
                }
                var nextValue = prevValue.rt5(this.kt4_1, tmp_0);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.ht4_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.vq8(prevValue_0.gq8_1.bq9(this.nt4_1));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            if (!(this.kt4_1 == null)) {
              this.hd_1 = 1;
              suspendResult = getTitleForCoursePermission(this.ht4_1, this.kt4_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.ht4_1.nqp_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.vq8(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).pt4 = function (it, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this.ht4_1, completion);
    i.it4_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.ot4(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $permissionFlow, this$0, resultContinuation) {
    this.at6_1 = $entityFlow;
    this.bt6_1 = $permissionFlow;
    this.ct6_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.at6_1, this.bt6_1, CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_0(null)));
            suspendResult = collectLatest(tmp_0, CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this.ct6_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.at6_1, this.bt6_1, this.ct6_1, completion);
    i.dt6_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.mt6_1 = $this_launch;
    this.nt6_1 = $entityFlow;
    this.ot6_1 = $permissionFlow;
    this.pt6_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.mt6_1, VOID, VOID, CoursePermissionDetailViewModel$slambda$slambda$slambda_0(this.nt6_1, this.ot6_1, this.pt6_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.mt6_1, this.nt6_1, this.ot6_1, this.pt6_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_126();
    var tmp0_safe_receiver = $this.mt5_1.t2().pt5_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_126();
    $this.wqq(this_0, 'clazzUid');
    var tmp$ret$2 = this_0.f3();
    $this.lqp_1.wp8('CoursePermissionEdit', tmp$ret$2);
  }
  function Companion_126() {
    this.qt6_1 = 'CoursePermissionDetail';
  }
  var Companion_instance_175;
  function Companion_getInstance_143() {
    return Companion_instance_175;
  }
  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.zt6_1 = this$0;
    this.at7_1 = $entityFlow;
    this.bt7_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.zt6_1.mt5_1, CoursePermissionDetailViewModel$slambda$slambda_0(this.ct7_1, this.at7_1, this.bt7_1, this.zt6_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.zt6_1, this.at7_1, this.bt7_1, completion);
    i.ct7_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.mt5_1 = MutableStateFlow(new CoursePermissionDetailUiState());
    this.nt5_1 = asStateFlow(this.mt5_1);
    var tmp = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.ot5_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var entityFlow = this.fqq().o7f().p7s(this.dqp_1, this.ot5_1);
    var tmp_0 = this.fqq().o7f();
    var tmp_1 = this.bqq();
    PermissionFlags_getInstance();
    var tmp_2 = new Long(1, 0);
    PermissionFlags_getInstance();
    var permissionFlow = tmp_0.gdk(tmp_1, this.ot5_1, tmp_2, new Long(2, 0));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissiondetail.CoursePermissionDetailViewModel.<anonymous>' call
        var tmp_3 = this.jqq().vol(strings_getInstance().amx_1);
        var tmp_4 = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.vq8(new FabUiState(VOID, tmp_3, tmp_4, CoursePermissionDetailViewModel$onClickEdit$ref(this)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_5 = this.aqq();
    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.pt5_1 = coursePermission;
    this.qt5_1 = permissionLabels;
  }
  protoOf(CoursePermissionDetailUiState).rt5 = function (coursePermission, permissionLabels) {
    return new CoursePermissionDetailUiState(coursePermission, permissionLabels);
  };
  protoOf(CoursePermissionDetailUiState).toString = function () {
    return 'CoursePermissionDetailUiState(coursePermission=' + this.pt5_1 + ', permissionLabels=' + this.qt5_1 + ')';
  };
  protoOf(CoursePermissionDetailUiState).hashCode = function () {
    var result = this.pt5_1 == null ? 0 : this.pt5_1.hashCode();
    result = imul(result, 31) + hashCode(this.qt5_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.pt5_1, tmp0_other_with_cast.pt5_1))
      return false;
    if (!equals(this.qt5_1, tmp0_other_with_cast.qt5_1))
      return false;
    return true;
  };
  function CoursePermissionEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.lt7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda$slambda).nt7 = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.nt7(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.mt7_1.o7f().cdk(this.lt7_1.rqv_1, this.lt7_1.nt8_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).jo1 = function (db, completion) {
    var i = new CoursePermissionEditViewModel$slambda$slambda(this.lt7_1, completion);
    i.mt7_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.nt7(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.wt8_1 = this$0;
    this.xt8_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.wt8_1.dqq());
            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_126();
            var tmp0_safe_receiver = this.xt8_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.xt8_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_126();
            var tmp4_safe_receiver = this.xt8_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.wt8_1, this.xt8_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.lt8_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.bt9(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CoursePermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.kt9_1 = this$0;
    this.lt9_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(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.io1(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.kt9_1.fqq().o7f().ddk(this.lt9_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).jo1 = function (it, completion) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda$slambda(this.kt9_1, this.lt9_1, completion);
    i.mt9_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_127() {
    this.nt9_1 = 'CoursePermissionEdit';
    this.ot9_1 = 'grantToRole';
  }
  var Companion_instance_176;
  function Companion_getInstance_144() {
    return Companion_instance_176;
  }
  function CoursePermissionEditViewModel$slambda(this$0, resultContinuation) {
    this.xt9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda).hsg = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda).he = function (p1, $completion) {
    return this.hsg(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.yt9_1.o7f();
            var tmp_1 = this.xt9_1.bqq();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.jdk(tmp_1, this.xt9_1.nt8_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).jo1 = function (it, completion) {
    var i = new CoursePermissionEditViewModel$slambda(this.xt9_1, completion);
    i.yt9_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.hsg(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.lt8_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.bt9(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.hta_1 = this$0;
    this.ita_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.hta_1, null);
            var tmp_2 = CoursePermissionEditViewModel$slambda$slambda_2(this.hta_1, this.ita_1, null);
            suspendResult = this.hta_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, CoursePermissionEditViewModel$slambda$lambda(this.hta_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            var title = suspendResult;
            l$ret$1: do {
              var this_0 = this.hta_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.hta_1.jqq().vol(strings_getInstance().on4_1);
                var nextValue = prevValue.vq8(VOID, VOID, title, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, CoursePermissionEditViewModel$onClickSave$ref(this.hta_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.hta_1.lt8_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.bt9(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.hta_1, this.ita_1, completion);
    i.jta_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.lt8_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.bt9(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.tta_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.tta_1.lt8_1.t2().yt8_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

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

            continue $sm;
          case 1:
            Companion_getInstance_117();
            var popUpToOnFinish = this.tta_1.jqp_1.ba('popUpToOnFinish');
            if (!(popUpToOnFinish == null)) {
              this.tta_1.lqp_1.vqb(popUpToOnFinish, false);
            } else {
              this.tta_1.tqv('CoursePermissionDetail', this.uta_1.zdk_1, this.uta_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.tta_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.lt8_1 = MutableStateFlow(new CoursePermissionEditUiState());
    this.mt8_1 = asStateFlow(this.lt8_1);
    var tmp = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.nt8_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.lt8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>' call
        var nextValue = prevValue.bt9(VOID, VOID, CoursePermissionConstants_getInstance().vrj_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nqp_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.vq8(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.vqq(tmp_0, VOID, tmp_1, CoursePermissionEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(CoursePermissionEditViewModel).vta = function (flag) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.lt8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.onTogglePermission.<anonymous>' call
        var entityVal = prevValue.yt8_1;
        var tmp;
        if (!(entityVal == null)) {
          tmp = prevValue.bt9(entityVal.hko(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).vsd = function () {
    var tmp = CoursePermissionEditViewModel$onClickSave$lambda(this);
    this.wqw(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.yt8_1 = entity;
    this.zt8_1 = fieldsEnabled;
    this.at9_1 = permissionLabels;
  }
  protoOf(CoursePermissionEditUiState).wta = function (entity, fieldsEnabled, permissionLabels) {
    return new CoursePermissionEditUiState(entity, fieldsEnabled, permissionLabels);
  };
  protoOf(CoursePermissionEditUiState).bt9 = function (entity, fieldsEnabled, permissionLabels, $super) {
    entity = entity === VOID ? this.yt8_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.zt8_1 : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? this.at9_1 : permissionLabels;
    return $super === VOID ? this.wta(entity, fieldsEnabled, permissionLabels) : $super.wta.call(this, entity, fieldsEnabled, permissionLabels);
  };
  protoOf(CoursePermissionEditUiState).toString = function () {
    return 'CoursePermissionEditUiState(entity=' + this.yt8_1 + ', fieldsEnabled=' + this.zt8_1 + ', permissionLabels=' + this.at9_1 + ')';
  };
  protoOf(CoursePermissionEditUiState).hashCode = function () {
    var result = this.yt8_1 == null ? 0 : this.yt8_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.zt8_1) | 0;
    result = imul(result, 31) + hashCode(this.at9_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.yt8_1, tmp0_other_with_cast.yt8_1))
      return false;
    if (!(this.zt8_1 === tmp0_other_with_cast.zt8_1))
      return false;
    if (!equals(this.at9_1, tmp0_other_with_cast.at9_1))
      return false;
    return true;
  };
  function CoursePermissionListViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function CoursePermissionListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ftb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).htb = function (it, $completion) {
    var tmp = this.itb(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.htb(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.gtb_1;
          var hasViewPermission = tmp0_container.y6();
          var hasEditPermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.ftb_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp1_permissionLabels = CoursePermissionConstants_getInstance().vrj_1;
              var this_1 = this.ftb_1.ktc_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.ptc(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.ftb_1.nqp_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var nextValue_0 = prevValue_0.vq8(prevValue_0.gq8_1.bq9(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).itb = function (it, completion) {
    var i = new CoursePermissionListViewModel$slambda$slambda$slambda(this.ftb_1, completion);
    i.gtb_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.htb(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.ytc_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.ytc_1.fqq().o7f();
            var tmp_1 = this.ytc_1.bqq();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.gdk(tmp_1, this.ytc_1.jtc_1, tmp_2, new Long(2, 0)));
            var tmp_4 = CoursePermissionListViewModel$slambda$slambda$slambda_0(this.ytc_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.ytc_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_128() {
    this.ztc_1 = 'CoursePermissionList';
    this.atd_1 = 'permissionResult';
  }
  var Companion_instance_177;
  function Companion_getInstance_145() {
    return Companion_instance_177;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_14(function_0) {
    this.btd_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_14).t1d = function (value, $completion) {
    return this.btd_1(value, $completion);
  };
  function CoursePermissionListViewModel$pagingSource$lambda(this$0) {
    return function () {
      return this$0.fqq().o7f().bdk(this$0.jtc_1, false);
    };
  }
  function CoursePermissionListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.zqy();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function CoursePermissionListViewModel$slambda(this$0, resultContinuation) {
    this.ktd_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.ktd_1.eqy_1, CoursePermissionListViewModel$slambda$slambda_0(this.ktd_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.ktd_1, completion);
    i.ltd_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.utd_1 = this$0;
    this.vtd_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.utd_1.fqq().o7f().eca(this.vtd_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.utd_1, this.vtd_1, completion);
    i.wtd_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_117();
    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.jtc_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.ktc_1 = CoursePermissionListViewModel$pagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.<anonymous>' call
        var tmp3_title = this.jqq().vol(strings_getInstance().sn2_1);
        var tmp0_text = this.jqq().vol(strings_getInstance().sn2_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.vq8(tmp4_fabState, VOID, tmp3_title);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.aqq();
    launch(tmp_2, VOID, VOID, CoursePermissionListViewModel$slambda_0(this, null));
  }
  protoOf(CoursePermissionListViewModel).yqy = function (searchText) {
  };
  protoOf(CoursePermissionListViewModel).zqy = function () {
    Companion_getInstance_117();
    var tmp = to('clazzUid', this.jtc_1.toString());
    Companion_getInstance_117();
    var goToOnPersonSelectedArg = appendQueryArgs('CoursePermissionEdit', mapOf([tmp, to('popUpToOnFinish', this.kqp_1)]));
    Companion_getInstance_206();
    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_117();
    this_0.s('listMode', ListViewMode_PICKER_getInstance().iqm_1);
    this_0.s('goToOnPersonSelected', goToOnPersonSelectedArg);
    var tmp$ret$2 = this_0.f3();
    this.rqq('People', 'permissionResult', null, tmp_0, tmp$ret$2);
  };
  protoOf(CoursePermissionListViewModel).xtd = 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_126();
    this_0.s('entityUid', coursePermission.zdk_1.toString());
    Companion_getInstance_126();
    this.wqq(this_0, 'clazzUid');
    var tmp$ret$2 = this_0.f3();
    this.lqp_1.wp8('CoursePermissionDetail', tmp$ret$2);
  };
  protoOf(CoursePermissionListViewModel).ytd = function (coursePermission) {
    var tmp = this.aqq();
    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.ltc_1 = permissionsList;
    this.mtc_1 = permissionLabels;
    this.ntc_1 = courseTerminology;
    this.otc_1 = showDeleteOption;
  }
  protoOf(CoursePermissionListUiState).ztd = function (permissionsList, permissionLabels, courseTerminology, showDeleteOption) {
    return new CoursePermissionListUiState(permissionsList, permissionLabels, courseTerminology, showDeleteOption);
  };
  protoOf(CoursePermissionListUiState).ptc = function (permissionsList, permissionLabels, courseTerminology, showDeleteOption, $super) {
    permissionsList = permissionsList === VOID ? this.ltc_1 : permissionsList;
    permissionLabels = permissionLabels === VOID ? this.mtc_1 : permissionLabels;
    courseTerminology = courseTerminology === VOID ? this.ntc_1 : courseTerminology;
    showDeleteOption = showDeleteOption === VOID ? this.otc_1 : showDeleteOption;
    return $super === VOID ? this.ztd(permissionsList, permissionLabels, courseTerminology, showDeleteOption) : $super.ztd.call(this, permissionsList, permissionLabels, courseTerminology, showDeleteOption);
  };
  protoOf(CoursePermissionListUiState).toString = function () {
    return 'CoursePermissionListUiState(permissionsList=' + this.ltc_1 + ', permissionLabels=' + this.mtc_1 + ', courseTerminology=' + this.ntc_1 + ', showDeleteOption=' + this.otc_1 + ')';
  };
  protoOf(CoursePermissionListUiState).hashCode = function () {
    var result = hashCode(this.ltc_1);
    result = imul(result, 31) + hashCode(this.mtc_1) | 0;
    result = imul(result, 31) + (this.ntc_1 == null ? 0 : hashCode(this.ntc_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.otc_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.ltc_1, tmp0_other_with_cast.ltc_1))
      return false;
    if (!equals(this.mtc_1, tmp0_other_with_cast.mtc_1))
      return false;
    if (!equals(this.ntc_1, tmp0_other_with_cast.ntc_1))
      return false;
    if (!(this.otc_1 === tmp0_other_with_cast.otc_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().ini_1;
    TextLimitType_LIMIT_WORDS_instance = new TextLimitType('LIMIT_WORDS', 0, tmp, 1);
    var tmp_0 = strings_getInstance().jni_1;
    TextLimitType_LIMIT_CHARS_instance = new TextLimitType('LIMIT_CHARS', 1, tmp_0, 2);
  }
  var MarkingType_TEACHER_instance;
  var MarkingType_PEERS_instance;
  function Companion_129() {
  }
  protoOf(Companion_129).skc = 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.cte_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_178;
  function Companion_getInstance_146() {
    return Companion_instance_178;
  }
  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.fte_1 = stringResource;
    this.gte_1 = value;
  }
  function MarkingType(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.cte_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().wn7_1);
    Companion_getInstance_1();
    var tmp_1 = to(2, strings_getInstance().vn7_1);
    Companion_getInstance_1();
    tmp.hte_1 = mapOf([tmp_0, tmp_1, to(0, strings_getInstance().xn7_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.bke_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.cke_1 = roundToInt(tmp$ret$3 / latestUnique.u());
    return this_0;
  }
  function _no_name_provided__qut3iv_6($this) {
    this.ite_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_6).o = function () {
    return this.ite_1.w();
  };
  protoOf(_no_name_provided__qut3iv_6).jte = 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.jte(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.kte_1 = block;
    this.lte_1 = assignmentMark;
    this.mte_1 = assignmentStatus;
  }
  protoOf(UstadAssignmentSubmissionHeaderUiState).toString = function () {
    return 'UstadAssignmentSubmissionHeaderUiState(block=' + this.kte_1 + ', assignmentMark=' + this.lte_1 + ', assignmentStatus=' + this.mte_1 + ')';
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).hashCode = function () {
    var result = this.kte_1 == null ? 0 : this.kte_1.hashCode();
    result = imul(result, 31) + (this.lte_1 == null ? 0 : this.lte_1.hashCode()) | 0;
    result = imul(result, 31) + (this.mte_1 == null ? 0 : this.mte_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.kte_1, tmp0_other_with_cast.kte_1))
      return false;
    if (!equals(this.lte_1, tmp0_other_with_cast.lte_1))
      return false;
    if (!(this.mte_1 == tmp0_other_with_cast.mte_1))
      return false;
    return true;
  };
  function UstadCourseAssignmentMarkListItemUiState(mark, localDateTimeNow, dayOfWeekStrings) {
    mark = mark === VOID ? new CourseAssignmentMarkAndMarkerName() : mark;
    this.nte_1 = mark;
    this.ote_1 = localDateTimeNow;
    this.pte_1 = dayOfWeekStrings;
  }
  protoOf(UstadCourseAssignmentMarkListItemUiState).qte = function () {
    var tmp0_safe_receiver = this.nte_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).rte = function () {
    var tmp0_elvis_lhs = this.nte_1.sbw_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = this.nte_1.tbw_1;
    return tmp + ' ' + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).ste = function () {
    return !(this.qte() === 0);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).tte = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.nte_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.nte_1 + ', localDateTimeNow=' + this.ote_1 + ', dayOfWeekStrings=' + this.pte_1 + ')';
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).hashCode = function () {
    var result = this.nte_1.hashCode();
    result = imul(result, 31) + this.ote_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.pte_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.nte_1.equals(tmp0_other_with_cast.nte_1))
      return false;
    if (!this.ote_1.equals(tmp0_other_with_cast.ote_1))
      return false;
    if (!equals(this.pte_1, tmp0_other_with_cast.pte_1))
      return false;
    return true;
  };
  function Companion_130() {
    this.ute_1 = 'CourseAssignment';
  }
  var Companion_instance_179;
  function Companion_getInstance_147() {
    return Companion_instance_179;
  }
  function ClazzAssignmentDetailViewModel$slambda(this$0, resultContinuation) {
    this.dtf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailViewModel$slambda).gtf = function (clazzAssignment, permissionPair, $completion) {
    var tmp = this.htf(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.gtf(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.ftf_1;
          var hasCourseViewPermission = tmp0_container.y6();
          var hasLearnerRecordPermission = tmp0_container.z6();
          var tmp_0;
          if (hasCourseViewPermission) {
            var tmp_1;
            var tmp1_safe_receiver = this.etf_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_126();
            var tmp_3 = to('entityUid', this.dtf_1.dqp_1.toString());
            Companion_getInstance_126();
            var tabArgs = mapOf([tmp_3, to('clazzUid', this.dtf_1.ftg_1.toString())]);
            var tabs = mutableListOf([new TabItem('CourseAssignmentDetailOverviewView', tabArgs, this.dtf_1.jqq().vol(strings_getInstance().en7_1))]);
            if (hasSubmissionsTab) {
              var tmp_4;
              var tmp_5;
              if (!hasLearnerRecordPermission) {
                var tmp2_safe_receiver = this.etf_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.dtf_1.jqq().vol(strings_getInstance().ynh_1);
              } else {
                tmp_4 = this.dtf_1.jqq().vol(strings_getInstance().nni_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).htf = function (clazzAssignment, permissionPair, completion) {
    var i = new ClazzAssignmentDetailViewModel$slambda(this.dtf_1, completion);
    i.etf_1 = clazzAssignment;
    i.ftf_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.gtf(clazzAssignment, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignment');
    var tmp = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.ftg_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var assignmentFlow = this.fqq().q7e().p7s(this.dqp_1, this.ftg_1);
    var tmp_0 = this.fqq().o7f();
    var tmp_1 = this.zqp().toc().cl0_1;
    PermissionFlags_getInstance();
    var tmp_2 = new Long(1, 0);
    PermissionFlags_getInstance();
    var permissionFlow = distinctUntilChanged(tmp_0.gdk(tmp_1, this.ftg_1, tmp_2, new Long(128, 0)));
    var tmp_3 = this;
    tmp_3.etg_1 = combine(assignmentFlow, permissionFlow, ClazzAssignmentDetailViewModel$slambda_0(this, null));
  }
  function ClazzAssignmentDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.gtg_1 = tabs;
  }
  protoOf(ClazzAssignmentDetailUiState).toString = function () {
    return 'ClazzAssignmentDetailUiState(tabs=' + this.gtg_1 + ')';
  };
  protoOf(ClazzAssignmentDetailUiState).hashCode = function () {
    return hashCode(this.gtg_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.gtg_1, tmp0_other_with_cast.gtg_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ptg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).rtg = function (it, $completion) {
    var tmp = this.stg(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.rtg((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.ptg_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ytg(this.qtg_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).stg = function (it, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this.ptg_1, completion);
    i.qtg_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.rtg(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.hth_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.hth_1.fqq().q7e().k7s(this.hth_1.jti_1, this.hth_1.kti_1, this.hth_1.bqq(), this.hth_1.jqq().vol(strings_getInstance().inh_1));
            var tmp_1 = ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda_0(this.hth_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.hth_1, completion);
    i.ith_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.nqp_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.vq8(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this$0, resultContinuation) {
    this.uti_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.uti_1.fqq().q7d().fe7(this.uti_1.jti_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var terminology = suspendResult;
            l$ret$1: do {
              var this_0 = this.uti_1.eqy_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ytg(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.uti_1, completion);
    i.vti_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.etj_1 = $this_launch;
    this.ftj_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.etj_1, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda_0(this.ftj_1, null));
          launchSetTitleFromClazzUid(this.ftj_1, this.ftj_1.kti_1, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$lambda(this.ftj_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.etj_1, this.ftj_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_131() {
    this.gtj_1 = 'CourseAssignmentSubmissionsTab';
  }
  var Companion_instance_180;
  function Companion_getInstance_148() {
    return Companion_instance_180;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_15(function_0) {
    this.htj_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_15).t1d = function (value, $completion) {
    return this.htj_1(value, $completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().q7e().l7s(this$0.jti_1, this$0.kti_1, this$0.bqq(), this$0.jqq().vol(strings_getInstance().inh_1), toQueryLikeParam(this$0.nqp_1.t2().nq8_1.cq8_1), this$0.eqy_1.t2().wtg_1.cqf_1);
    };
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this$0, resultContinuation) {
    this.qtj_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.rtj_1, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_0(this.qtj_1, null));
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.qtj_1.eqy_1, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_2(this.rtj_1, this.qtj_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.qtj_1, completion);
    i.rtj_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_117();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.jti_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_1 = this;
    Companion_getInstance_126();
    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.kti_1 = tmp_2;
    var tmp_3 = this;
    tmp_3.lti_1 = ClazzAssignmentDetailSubmissionsTabViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>' call
        var nextValue = prevValue.ytg(VOID, this.lti_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nqp_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.vq8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.nqz());
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_4 = this.aqq();
    launch(tmp_4, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda_0(this, null));
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).stj = function (assignmentSubmitter) {
    var tmp = to('assignmentUid', this.jti_1.toString());
    var tmp_0 = to('submitterUid', assignmentSubmitter.r7v_1.toString());
    Companion_getInstance_126();
    this.lqp_1.wp8('CourseAssignmentSubmitter', mapOf([tmp, tmp_0, to('clazzUid', this.kti_1.toString())]));
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).ttj = function (sortOrderOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.onChangeSortOption.<anonymous>' call
        var nextValue = prevValue.ytg(VOID, VOID, VOID, sortOrderOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).yqy = function (searchText) {
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).zqy = function () {
  };
  function Companion_132() {
    Companion_instance_181 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().wml_1;
    var tmp_1 = new SortOrderOption(tmp_0, 5, true);
    var tmp_2 = strings_getInstance().wml_1;
    tmp.utj_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 6, false)]);
  }
  var Companion_instance_181;
  function Companion_getInstance_149() {
    if (Companion_instance_181 == null)
      new Companion_132();
    return Companion_instance_181;
  }
  function ClazzAssignmentDetailSubmissionsTabUiState$_init_$lambda_ecu5q() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailSubmissionsTabUiState(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) {
    Companion_getInstance_149();
    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_149().utj_1 : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    this.ttg_1 = progressSummary;
    this.utg_1 = assignmentSubmitterList;
    this.vtg_1 = sortOptions;
    this.wtg_1 = sortOption;
    this.xtg_1 = courseTerminology;
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).vtj = function (progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) {
    return new ClazzAssignmentDetailSubmissionsTabUiState(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).ytg = function (progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology, $super) {
    progressSummary = progressSummary === VOID ? this.ttg_1 : progressSummary;
    assignmentSubmitterList = assignmentSubmitterList === VOID ? this.utg_1 : assignmentSubmitterList;
    sortOptions = sortOptions === VOID ? this.vtg_1 : sortOptions;
    sortOption = sortOption === VOID ? this.wtg_1 : sortOption;
    courseTerminology = courseTerminology === VOID ? this.xtg_1 : courseTerminology;
    return $super === VOID ? this.vtj(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) : $super.vtj.call(this, progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).toString = function () {
    return 'ClazzAssignmentDetailSubmissionsTabUiState(progressSummary=' + this.ttg_1 + ', assignmentSubmitterList=' + this.utg_1 + ', sortOptions=' + this.vtg_1 + ', sortOption=' + this.wtg_1 + ', courseTerminology=' + this.xtg_1 + ')';
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).hashCode = function () {
    var result = this.ttg_1 == null ? 0 : hashCode(this.ttg_1);
    result = imul(result, 31) + hashCode(this.utg_1) | 0;
    result = imul(result, 31) + hashCode(this.vtg_1) | 0;
    result = imul(result, 31) + this.wtg_1.hashCode() | 0;
    result = imul(result, 31) + (this.xtg_1 == null ? 0 : hashCode(this.xtg_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.ttg_1, tmp0_other_with_cast.ttg_1))
      return false;
    if (!equals(this.utg_1, tmp0_other_with_cast.utg_1))
      return false;
    if (!equals(this.vtg_1, tmp0_other_with_cast.vtg_1))
      return false;
    if (!this.wtg_1.equals(tmp0_other_with_cast.wtg_1))
      return false;
    if (!equals(this.xtg_1, tmp0_other_with_cast.xtg_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.wtj_1 : THROW_CCE();
    if (!$this.equals(tmp0_other_with_cast))
      return false;
    return true;
  }
  function AssignmentSubmitterSummaryUiState(person) {
    this.wtj_1 = person;
  }
  protoOf(AssignmentSubmitterSummaryUiState).toString = function () {
    return AssignmentSubmitterSummaryUiState__toString_impl_fdil8u(this.wtj_1);
  };
  protoOf(AssignmentSubmitterSummaryUiState).hashCode = function () {
    return AssignmentSubmitterSummaryUiState__hashCode_impl_6dnbk1(this.wtj_1);
  };
  protoOf(AssignmentSubmitterSummaryUiState).equals = function (other) {
    return AssignmentSubmitterSummaryUiState__equals_impl_zhk063(this.wtj_1, other);
  };
  function get_listItemUiState(_this__u8e3s4) {
    return _AssignmentSubmitterSummaryUiState___init__impl__s3rgxm(_this__u8e3s4);
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ftk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).zqc = function (it, $completion) {
    var tmp = this.aqd(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.zqc(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.gtk_1.gqc_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.ftk_1.ytl(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).aqd = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this.ftk_1, completion);
    i.gtk_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.zqc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.htm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).jtm = function (assignmentData, $completion) {
    var tmp = this.ktm(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.jtm((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.htm_1.etl_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.itm_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.itm_1;
              var tmp9_assignment = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q7y_1;
              var tmp2_safe_receiver = this.itm_1;
              var tmp10_courseBlock = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.r7y_1;
              var tmp3_safe_receiver = this.itm_1;
              var tmp11_courseBlockPicture = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.s7y_1;
              var tmp5_safe_receiver = this.itm_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.itm_1;
              var tmp13_courseGroupSet = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.t7y_1;
              var tmp_1;
              if (isEnrolledButNotInGroup) {
                tmp_1 = this.htm_1.jqq().vol(strings_getInstance().xnl_1);
              } else {
                tmp_1 = null;
              }
              var tmp14_unassignedError = tmp_1;
              var tmp7_safe_receiver = this.itm_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.mtn(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).ktm = function (assignmentData, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.htm_1, completion);
    i.itm_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.jtm(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).xtn = function (submissions, submissionFiles, $completion) {
    var tmp = this.ytn(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.xtn(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.vtn_1, this.wtn_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).ytn = function (submissions, submissionFiles, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.vtn_1 = submissions;
    i.wtn_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.xtn(submissions, submissionFiles, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.hto_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).jto = function (it, $completion) {
    var tmp = this.kto(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.jto((!(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.hto_1.etl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.mtn(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ito_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).kto = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.hto_1, completion);
    i.ito_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.jto(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.tto_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).vto = function (it, $completion) {
    var tmp = this.wto(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.vto((!(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.tto_1.etl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.mtn(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.uto_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).wto = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.tto_1, completion);
    i.uto_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.vto(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.ftp_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).jtp = function (value, $completion) {
    var tmp = this.ktp(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.jtp(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.htp_1 = this.ftp_1;
            var tmp_1 = this;
            tmp_1.itp_1 = this.gtp_1;
            this.hd_1 = 1;
            var tmp0_safe_receiver = this.itp_1.ltp_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kc2_1;
            suspendResult = this.htp_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).ktp = function (value, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda(this.ftp_1, completion);
    i.gtp_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.jtp(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$71(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.utp_1 = _this__u8e3s4;
    this.vtp_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.wtp_1 = this.vtp_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.wtp_1, null);
            suspendResult = this.utp_1.xtp_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.gtq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).itq = function (it, $completion) {
    var tmp = this.jtq(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.itq((!(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.gtq_1.etl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.mtn(VOID, VOID, VOID, VOID, VOID, this.htq_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).jtq = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this.gtq_1, completion);
    i.htq_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.itq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_7($this) {
    this.xtp_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_7).ktq = 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_7).a1c = function (collector, $completion) {
    return this.ktq(collector, $completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.ttq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).vtq = function (submissionUid, $completion) {
    var tmp = this.wtq(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.vtq(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.ttq_1.dqq().s7e().aca(this.utq_1));
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this.ttq_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).wtq = function (submissionUid, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.ttq_1, completion);
    i.utq_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.vtq(submissionUid, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1($entityFlow, this$0, resultContinuation) {
    this.ftr_1 = $entityFlow;
    this.gtr_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.gtr_1, null);
            suspendResult = this.ftr_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.ftr_1, this.gtr_1, completion);
    i.htr_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.nqp_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.vq8(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.qtr_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.str_1 = this.qtr_1.fqq().r7e().vc1(this.qtr_1.bqq(), this.qtr_1.dqp_1);
            this.ttr_1 = this.qtr_1.fqq().s7e().bca(this.qtr_1.bqq(), this.qtr_1.dqp_1);
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.str_1, this.ttr_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(null)));
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.qtr_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.qtr_1, completion);
    i.rtr_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.cts_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.cts_1.fqq().t7e().pbv(this.cts_1.bqq(), this.cts_1.dqp_1);
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.cts_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.cts_1, completion);
    i.dts_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.mts_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.mts_1.gtl_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_7(this_0));
            suspendResult = collectLatest(tmp_0, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.mts_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.mts_1, completion);
    i.nts_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.wts_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.wts_1.nqq(this.wts_1.gqq(), 'submissionHtml');
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_0(this.wts_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.wts_1, completion);
    i.xts_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.gtt_1 = $this_launch;
    this.htt_1 = this$0;
    this.itt_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.gtt_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_2(this.itt_1, this.htt_1, null));
          launchSetTitleFromClazzUid(this.htt_1, this.htt_1.ptl_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$lambda(this.htt_1));
          launch(this.gtt_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_4(this.htt_1, null));
          launch(this.gtt_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_6(this.htt_1, null));
          launch(this.gtt_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_8(this.htt_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.gtt_1, this.htt_1, this.itt_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.rtt_1 = this$0;
    this.stt_1 = $file;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(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.io1(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.rtt_1.fqq().s7e();
            var tmp0_safe_receiver = this.stt_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).jo1 = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this.rtt_1, this.stt_1, completion);
    i.ttt_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.io1(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.etl_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.mtn(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.qtl_1;
    saveAndUploadUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelTransferJobUseCase__o6e2y4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rtl_1;
    cancelTransferJobUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openBlobUiUseCase__fzusqz($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.stl_1;
    openBlobUiUseCase$factory_0();
    return this_0.t2();
  }
  function _get_ustadAccountManager__el9prc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.utl_1;
    ustadAccountManager$factory_0();
    return this_0.t2();
  }
  function _get_showSocialWarningUseCase__ft8jc6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vtl_1;
    showSocialWarningUseCase$factory_0();
    return this_0.t2();
  }
  function _get_dismissSocialWarningUseCase__st8mv5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wtl_1;
    dismissSocialWarningUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xtl_1;
    openExternalLinkUseCase$factory_0();
    return this_0.t2();
  }
  function newCourseAssignmentSubmission($this) {
    var tmp = get_doorPrimaryKeyManager($this.dqq());
    Companion_getInstance_1();
    var tmp0_casUid = tmp.n62(522);
    var tmp1_casAssignmentUid = $this.dqp_1;
    var tmp2_casClazzUid = $this.ptl_1;
    var tmp3_casSubmitterPersonUid = $this.zqp().eoc().znw_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.ttl_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = $this;
    var tmp_1 = $this.aqq();
    tmp_0.ttl_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda_0($this, submissionFile, intent, null));
  }
  function Companion_133() {
    this.utt_1 = 'latestSubmission';
    this.vtt_1 = 'submissionHtml';
    this.wtt_1 = 'CourseAssignmentDetailOverviewView';
  }
  var Companion_instance_182;
  function Companion_getInstance_150() {
    return Companion_instance_182;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_16(function_0) {
    this.xtt_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_16).t1d = function (value, $completion) {
    return this.xtt_1(value, $completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$privateCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().u7e().oac(this$0.bqq(), this$0.dqp_1, false);
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$courseCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().u7e().qac(this$0.dqp_1, false);
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda(this$0, $savedStateHandle, $entityFlow, resultContinuation) {
    this.gtu_1 = this$0;
    this.htu_1 = $savedStateHandle;
    this.itu_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.gtu_1.oqq(this.htu_1, 'latestSubmission', Companion_getInstance_1().n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ktu_1 = suspendResult;
            this.ltu_1 = this.ktu_1 == null ? newCourseAssignmentSubmission(this.gtu_1) : this.ktu_1;
            l$ret$1: do {
              var this_0 = this.gtu_1.gtl_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mtu(this.ltu_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.jtu_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda_0(this.gtu_1, null));
            this.hd_1 = 2;
            suspendResult = whenSubscribed(this.gtu_1.etl_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda_2(this.jtu_1, this.gtu_1, this.itu_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.gtu_1, this.htu_1, this.itu_1, completion);
    i.jtu_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.vtu_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.vtu_1).bp4(toString_0(_get_ustadAccountManager__el9prc(this.vtu_1).eoc().znw_1.g96_1));
          l$ret$1: do {
            var this_0 = this.vtu_1.etl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.mtn(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.vtu_1, completion);
    i.wtu_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.ftv_1 = $submissionToSave;
    this.gtv_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.ftv_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.gtv_1.pqq(this.gtv_1.jqp_1, 'latestSubmission', Companion_getInstance_1().n4r(), this.ftv_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.ftv_1, this.gtv_1, completion);
    i.htv_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.qtv_1 = this$0;
    this.rtv_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.qtv_1.fqq().u7e();
            var this_0 = new Comments();
            this_0.kad_1 = this.rtv_1;
            this_0.jad_1 = this.qtv_1.bqq();
            this_0.lad_1 = this.qtv_1.etl_1.t2().ptm_1;
            this_0.had_1 = this.qtv_1.dqp_1;
            this_0.gad_1 = this.qtv_1.itl_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.qtv_1.itl_1.x1k('');
            tmp_1.ttv_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.qtv_1.lqq(Companion_getInstance_98().dq9_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.qtv_1.lqq(Companion_getInstance_98().dq9_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.qtv_1, this.rtv_1, completion);
    i.stv_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.ctw_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.ctw_1.fqq().u7e();
            var this_0 = new Comments();
            this_0.kad_1 = new Long(0, 0);
            this_0.jad_1 = this.ctw_1.bqq();
            this_0.had_1 = this.ctw_1.dqp_1;
            this_0.gad_1 = this.ctw_1.ktl_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.ctw_1.ktl_1.x1k('');
            tmp_1.etw_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.ctw_1.lqq(Companion_getInstance_98().dq9_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.ctw_1.lqq(Companion_getInstance_98().dq9_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.ctw_1, completion);
    i.dtw_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.ntw_1 = this$0;
    this.otw_1 = $size;
    this.ptw_1 = $mimeType;
    this.qtw_1 = $fileName;
    this.rtw_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.ntw_1.dqq());
            suspendResult = tmp_0.o62(90, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ttw_1 = suspendResult;
            var tmp_1 = this;
            var tmp0_safe_receiver = this.ntw_1.gtl_1.t2().ltp_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kc2_1;
            tmp_1.utw_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            this.vtw_1 = this.ntw_1.etl_1.t2().ptm_1;
            this.wtw_1 = this.otw_1.mb();
            this.xtw_1 = this.ntw_1.dqp_1;
            this.ytw_1 = this.ntw_1.ptl_1;
            this.ztw_1 = new CourseAssignmentSubmissionFile(this.ttw_1, this.utw_1, this.vtw_1, this.xtw_1, this.ytw_1, this.ptw_1, this.qtw_1, this.rtw_1, this.wtw_1);
            this.hd_1 = 2;
            suspendResult = this.ntw_1.dqq().s7e().zc9(listOf_0(this.ztw_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.ntw_1);
            var tmp_3 = this.ztw_1.yca_1;
            suspendResult = tmp_2.tot(listOf_0(new SaveLocalUriAsBlobItem(this.rtw_1, tmp_3, 90, this.ptw_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.ntw_1, this.otw_1, this.ptw_1, this.qtw_1, this.rtw_1, completion);
    i.stw_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.itx_1 = this$0;
    this.jtx_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.itx_1.dtl_1.xol(this.itx_1.fqq(), this.itx_1.etl_1.t2().ptm_1, this.itx_1.dqp_1, this.itx_1.zqp().eoc().znw_1.f96_1, this.jtx_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.itx_1.gtl_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mtu(newCourseAssignmentSubmission(this.itx_1));
                if (this_0.y1k(prevValue, nextValue)) {
                  tmp$ret$0 = nextValue;
                  break l$ret$1;
                }
              }
            }
             while (false);
            tmp_0.mtx_1 = tmp$ret$0.ltp_1;
            l$ret$3: do {
              var this_1 = this.itx_1.etl_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mtn(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.mtx_1 == null)) {
              this.hd_1 = 3;
              suspendResult = this.itx_1.pqq(this.itx_1.jqp_1, 'latestSubmission', Companion_getInstance_1().n4r(), this.mtx_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.itx_1.hqq().kq9(new Snack(this.itx_1.jqq().vol(strings_getInstance().wn7_1)));
            tmp_1.ltx_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.itx_1.etl_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.mtn(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.ltx_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.itx_1.etl_1;
              while (true) {
                var prevValue_2 = this_3.t2();
                var nextValue_2 = prevValue_2.mtn(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.itx_1.lqq(Companion_getInstance_98().dq9_1);
            throw t;
          case 7:
            throw this.kd_1;
          case 8:
            this.id_1 = 7;
            l$ret$11: do {
              var this_4 = this.itx_1.etl_1;
              while (true) {
                var prevValue_3 = this_4.t2();
                var nextValue_3 = prevValue_3.mtn(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.itx_1.lqq(Companion_getInstance_98().dq9_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.itx_1, this.jtx_1, completion);
    i.ktx_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.vtx_1 = this$0;
    this.wtx_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.vtx_1.fqq();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda_0(this.vtx_1, this.wtx_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var tmp0_safe_receiver = this.wtx_1.xcb_1;
            tmp_1.ytx_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zcb_1;
            if (this.ytx_1 == null) {
              this.ztx_1 = null;
              this.hd_1 = 4;
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.aty_1 = this.ytx_1;
              var tmp_3 = this;
              tmp_3.bty_1 = this.aty_1;
              this.cty_1 = _get_cancelTransferJobUseCase__o6e2y4(this.vtx_1);
              if (this.cty_1 == null) {
                this.dty_1 = null;
                this.hd_1 = 3;
                continue $sm;
              } else {
                this.hd_1 = 2;
                suspendResult = this.cty_1.i1i(this.bty_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 2:
            var tmp_4 = this;
            tmp_4.dty_1 = Unit_instance;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.ztx_1 = this.aty_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.vtx_1, this.wtx_1, completion);
    i.xtx_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.mty_1 = this$0;
    this.nty_1 = $submissionFile;
    this.oty_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.qty_1 = _get_openBlobUiUseCase__fzusqz(this.mty_1);
            if (this.qty_1 == null) {
              this.rty_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = asBlobOpenItem(this.nty_1);
              suspendResult = this.qty_1.xor(tmp_0, ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda$lambda(this.mty_1), this.oty_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.rty_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.mty_1, this.nty_1, this.oty_1, completion);
    i.pty_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.atz_1 = this$0;
    this.btz_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.atz_1.fqq().u7e().nac(this.btz_1.fad_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.atz_1.hqq().kq9(new Snack(this.atz_1.jqq().vol(strings_getInstance().smk_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.atz_1, this.btz_1, completion);
    i.ctz_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.dtl_1 = submitAssignmentUseCase;
    this.etl_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.jqq().qq7()));
    this.ftl_1 = asStateFlow(this.etl_1);
    this.gtl_1 = MutableStateFlow(new ClazzAssignmentDetailoverviewSubmissionUiState());
    this.htl_1 = asStateFlow(this.gtl_1);
    this.itl_1 = MutableStateFlow('');
    this.jtl_1 = asStateFlow(this.itl_1);
    this.ktl_1 = MutableStateFlow('');
    this.ltl_1 = asStateFlow(this.ktl_1);
    var tmp_2 = this;
    tmp_2.mtl_1 = ClazzAssignmentDetailOverviewViewModel$privateCommentsPagingSourceFactory$lambda(this);
    var tmp_3 = this;
    tmp_3.ntl_1 = ClazzAssignmentDetailOverviewViewModel$courseCommentsPagingSourceFactory$lambda(this);
    this.otl_1 = null;
    var tmp_4 = this;
    Companion_getInstance_126();
    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.ptl_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.qtl_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.rtl_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.stl_1 = InstanceOrNull(this_2, tmp$ret$6, null).a5d(this, openBlobUiUseCase$factory());
    this.ttl_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.utl_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.vtl_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.wtl_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.xtl_1 = Instance(di, tmp$ret$14, null).a5d(this, openExternalLinkUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.etl_1;
      while (true) {
        var prevValue = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>' call
        var tmp_20 = this.bqq();
        var tmp_21 = this.zqp().eoc().znw_1.hks();
        var tmp0_safe_receiver_0 = this.zqp().eoc().bnx_1;
        var nextValue = prevValue.mtn(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).zpb(toString_0(_get_ustadAccountManager__el9prc(this).eoc().znw_1.g96_1)));
        if (this_3.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var entityFlow = shareIn(this.fqq().q7e().t7s(this.dqp_1, this.ptl_1, this.zqp().toc().cl0_1), this.aqq(), Companion_getInstance_12().v1h());
    var tmp_22 = this.aqq();
    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.etl_1;
      while (true) {
        var prevValue_0 = this_4.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>' call
        var tmp0_privateComments = this.mtl_1;
        var tmp1_courseComments = this.ntl_1;
        var nextValue_0 = prevValue_0.mtn(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).dtz = function () {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).etz = function (option) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.etl_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onClickMarksFilterChip.<anonymous>' call
        var nextValue = prevValue.mtn(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, option.yq9_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ytl = function (text) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.gtl_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.ltp_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          tmp = shallowCopy_0(tmp0_safe_receiver, ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$lambda(text));
        }
        var nextValue = prevValue.mtu(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var submissionToSave = tmp$ret$1.ltp_1;
    var tmp0_safe_receiver_0 = this.otl_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.aqq();
    tmp_0.otl_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda_0(submissionToSave, this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ftz = function (text) {
    this.itl_1.x1k(text);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).gtz = function () {
    var submitterUid = this.etl_1.t2().ptm_1;
    if (submitterUid.c7(new Long(0, 0)) <= 0)
      return Unit_instance;
    if (this.mqq().equals(Companion_getInstance_98().cq9_1))
      return Unit_instance;
    this.lqq(Companion_getInstance_98().cq9_1);
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda_0(this, submitterUid, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).htz = function (text) {
    this.ktl_1.x1k(text);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).itz = function () {
    if (this.mqq().equals(Companion_getInstance_98().cq9_1))
      return Unit_instance;
    this.lqq(Companion_getInstance_98().cq9_1);
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).jtz = function (uri, fileName, mimeType, size) {
    var tmp0_safe_receiver = this.etl_1.t2().ltm_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.hqq().kq9(new Snack(this.jqq().vol(strings_getInstance().imv_1)));
      return Unit_instance;
    }
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda_0(this, size, mimeType, fileName, uri, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ktz = function () {
    if (!this.etl_1.t2().wtm_1)
      return Unit_instance;
    var tmp0_elvis_lhs = this.gtl_1.t2().ltp_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.etl_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onClickSubmit.<anonymous>' call
        var nextValue = prevValue.mtn(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.lqq(Companion_getInstance_98().cq9_1);
    var tmp_0 = this.aqq();
    launch(tmp_0, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda_0(this, submission, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ltz = function (submission) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.etl_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onToggleSubmissionExpandCollapse.<anonymous>' call
        var nextValue = prevValue.mtn(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.itn_1, submission.kc2_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).mtz = function () {
    Companion_getInstance_126();
    var tmp0_safe_receiver = this.etl_1.t2().otm_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_126();
    this.lqp_1.wp8('CourseGroupSet', mapOf([tmp, to('clazzUid', this.ptl_1.toString())]));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ntz = function (file) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda_0(this, file, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).otz = function (file) {
    openSubmissionFileAsBlob(this, file, OpenBlobIntent_VIEW_getInstance());
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ptz = function (comments) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda_0(this, comments, null));
  };
  function _get_latestUniqueMarksByMarker__e0a3pq($this) {
    return latestUniqueMarksByMarker($this.ttm_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().qnm_1;
      var tmp_4 = new MessageIdOption2(tmp_3, 1);
      var tmp_5 = strings_getInstance().gn1_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.fmf(), Companion_getInstance_9().emj()) : 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.ltm_1 = assignment;
    this.mtm_1 = courseBlock;
    this.ntm_1 = courseBlockPicture;
    this.otm_1 = courseGroupSet;
    this.ptm_1 = submitterUid;
    this.qtm_1 = editableSubmissionFiles;
    this.rtm_1 = submissionTooLong;
    this.stm_1 = submissions;
    this.ttm_1 = markList;
    this.utm_1 = courseComments;
    this.vtm_1 = privateComments;
    this.wtm_1 = fieldsEnabled;
    this.xtm_1 = selectedChipId;
    this.ytm_1 = gradeFilterChips;
    this.ztm_1 = submissionHeaderUiState;
    this.atn_1 = unassignedError;
    this.btn_1 = submissionError;
    this.ctn_1 = activeUserPersonUid;
    this.dtn_1 = activeUserPersonName;
    this.etn_1 = activeUserPictureUri;
    this.ftn_1 = courseTerminology;
    this.gtn_1 = localDateTimeNow;
    this.htn_1 = dayOfWeekStringMap;
    this.itn_1 = collapsedSubmissions;
    this.jtn_1 = openingFileSubmissionState;
    this.ktn_1 = showModerateOptions;
    this.ltn_1 = showSocialWarning;
  }
  protoOf(ClazzAssignmentDetailOverviewUiState).qtz = function () {
    var tmp0_safe_receiver = this.mtm_1;
    return isDateSet(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7y_1);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).rtz = function () {
    return this.stz();
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ttz = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = this.atn_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).utz = function () {
    var tmp0_safe_receiver = this.ltm_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.s7t_1) === true;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).vtz = function () {
    return this.ptm_1.c7(new Long(0, 0)) > 0;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).wtz = function () {
    var tmp;
    if (this.vtz()) {
      var tmp0_safe_receiver = this.ltm_1;
      tmp = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t7t_1) === true;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).xtz = function () {
    var timeNow = systemTimeInMillis();
    var tmp0_safe_receiver = this.mtm_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.mtm_1;
    if (isDateSet(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.d7y_1)) {
      var tmp3_safe_receiver = this.mtm_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).stz = function () {
    if (!this.vtz())
      return false;
    if (!this.xtz())
      return false;
    var tmp;
    var tmp0_safe_receiver = this.ltm_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.stm_1.c1();
    } else {
      tmp = false;
    }
    if (tmp) {
      return false;
    }
    return true;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ytz = function () {
    var tmp;
    var tmp_0;
    if (this.stz()) {
      var tmp0_safe_receiver = this.ltm_1;
      tmp_0 = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v7t_1) === true;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.qtm_1.u() < this.ltm_1.y7t_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ztz = function () {
    return this.vtz() ? submissionStatusFor(this.ttm_1, this.stm_1) : null;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).au0 = function () {
    return !(this.bu0() == null);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).cu0 = 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.bu0();
    return !(it == null) ? !(it.cke_1 === 0) : false;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).du0 = function () {
    var tmp;
    var tmp0_safe_receiver = this.ltm_1;
    if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7u_1) === true) {
      tmp = this.stz();
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).eu0 = function () {
    var tmp;
    if (this.xtm_1 === 1) {
      tmp = _get_latestUniqueMarksByMarker__e0a3pq(this);
    } else {
      tmp = this.ttm_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).bu0 = function () {
    return averageMark(this.ttm_1);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).fu0 = function () {
    var tmp0_safe_receiver = this.ltm_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).gu0 = 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).mtn = 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.ltm_1 : assignment;
    courseBlock = courseBlock === VOID ? this.mtm_1 : courseBlock;
    courseBlockPicture = courseBlockPicture === VOID ? this.ntm_1 : courseBlockPicture;
    courseGroupSet = courseGroupSet === VOID ? this.otm_1 : courseGroupSet;
    submitterUid = submitterUid === VOID ? this.ptm_1 : submitterUid;
    editableSubmissionFiles = editableSubmissionFiles === VOID ? this.qtm_1 : editableSubmissionFiles;
    submissionTooLong = submissionTooLong === VOID ? this.rtm_1 : submissionTooLong;
    submissions = submissions === VOID ? this.stm_1 : submissions;
    markList = markList === VOID ? this.ttm_1 : markList;
    courseComments = courseComments === VOID ? this.utm_1 : courseComments;
    privateComments = privateComments === VOID ? this.vtm_1 : privateComments;
    fieldsEnabled = fieldsEnabled === VOID ? this.wtm_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.xtm_1 : selectedChipId;
    gradeFilterChips = gradeFilterChips === VOID ? this.ytm_1 : gradeFilterChips;
    submissionHeaderUiState = submissionHeaderUiState === VOID ? this.ztm_1 : submissionHeaderUiState;
    unassignedError = unassignedError === VOID ? this.atn_1 : unassignedError;
    submissionError = submissionError === VOID ? this.btn_1 : submissionError;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.ctn_1 : activeUserPersonUid;
    activeUserPersonName = activeUserPersonName === VOID ? this.dtn_1 : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? this.etn_1 : activeUserPictureUri;
    courseTerminology = courseTerminology === VOID ? this.ftn_1 : courseTerminology;
    localDateTimeNow = localDateTimeNow === VOID ? this.gtn_1 : localDateTimeNow;
    dayOfWeekStringMap = dayOfWeekStringMap === VOID ? this.htn_1 : dayOfWeekStringMap;
    collapsedSubmissions = collapsedSubmissions === VOID ? this.itn_1 : collapsedSubmissions;
    openingFileSubmissionState = openingFileSubmissionState === VOID ? this.jtn_1 : openingFileSubmissionState;
    showModerateOptions = showModerateOptions === VOID ? this.ktn_1 : showModerateOptions;
    showSocialWarning = showSocialWarning === VOID ? this.ltn_1 : showSocialWarning;
    return $super === VOID ? this.gu0(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.gu0.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.ltm_1 + ', courseBlock=' + this.mtm_1 + ', courseBlockPicture=' + this.ntm_1 + ', courseGroupSet=' + this.otm_1 + ', submitterUid=' + this.ptm_1.toString() + ', editableSubmissionFiles=' + this.qtm_1 + ', submissionTooLong=' + this.rtm_1 + ', submissions=' + this.stm_1 + ', markList=' + this.ttm_1 + ', courseComments=' + this.utm_1 + ', privateComments=' + this.vtm_1 + ', fieldsEnabled=' + this.wtm_1 + ', selectedChipId=' + this.xtm_1 + ', gradeFilterChips=' + this.ytm_1 + ', submissionHeaderUiState=' + this.ztm_1 + ', unassignedError=' + this.atn_1 + ', submissionError=' + this.btn_1 + ', activeUserPersonUid=' + this.ctn_1.toString() + ', activeUserPersonName=' + this.dtn_1 + ', activeUserPictureUri=' + this.etn_1 + ', courseTerminology=' + this.ftn_1 + ', localDateTimeNow=' + this.gtn_1 + ', dayOfWeekStringMap=' + this.htn_1 + ', collapsedSubmissions=' + this.itn_1 + ', openingFileSubmissionState=' + this.jtn_1 + ', showModerateOptions=' + this.ktn_1 + ', showSocialWarning=' + this.ltn_1 + ')';
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).hashCode = function () {
    var result = this.ltm_1 == null ? 0 : this.ltm_1.hashCode();
    result = imul(result, 31) + (this.mtm_1 == null ? 0 : this.mtm_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ntm_1 == null ? 0 : this.ntm_1.hashCode()) | 0;
    result = imul(result, 31) + (this.otm_1 == null ? 0 : hashCode(this.otm_1)) | 0;
    result = imul(result, 31) + this.ptm_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.qtm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rtm_1) | 0;
    result = imul(result, 31) + hashCode(this.stm_1) | 0;
    result = imul(result, 31) + hashCode(this.ttm_1) | 0;
    result = imul(result, 31) + hashCode(this.utm_1) | 0;
    result = imul(result, 31) + hashCode(this.vtm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wtm_1) | 0;
    result = imul(result, 31) + this.xtm_1 | 0;
    result = imul(result, 31) + hashCode(this.ytm_1) | 0;
    result = imul(result, 31) + this.ztm_1.hashCode() | 0;
    result = imul(result, 31) + (this.atn_1 == null ? 0 : getStringHashCode(this.atn_1)) | 0;
    result = imul(result, 31) + (this.btn_1 == null ? 0 : getStringHashCode(this.btn_1)) | 0;
    result = imul(result, 31) + this.ctn_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.dtn_1) | 0;
    result = imul(result, 31) + (this.etn_1 == null ? 0 : getStringHashCode(this.etn_1)) | 0;
    result = imul(result, 31) + (this.ftn_1 == null ? 0 : hashCode(this.ftn_1)) | 0;
    result = imul(result, 31) + this.gtn_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.htn_1) | 0;
    result = imul(result, 31) + hashCode(this.itn_1) | 0;
    result = imul(result, 31) + (this.jtn_1 == null ? 0 : this.jtn_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ktn_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ltn_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.ltm_1, tmp0_other_with_cast.ltm_1))
      return false;
    if (!equals(this.mtm_1, tmp0_other_with_cast.mtm_1))
      return false;
    if (!equals(this.ntm_1, tmp0_other_with_cast.ntm_1))
      return false;
    if (!equals(this.otm_1, tmp0_other_with_cast.otm_1))
      return false;
    if (!this.ptm_1.equals(tmp0_other_with_cast.ptm_1))
      return false;
    if (!equals(this.qtm_1, tmp0_other_with_cast.qtm_1))
      return false;
    if (!(this.rtm_1 === tmp0_other_with_cast.rtm_1))
      return false;
    if (!equals(this.stm_1, tmp0_other_with_cast.stm_1))
      return false;
    if (!equals(this.ttm_1, tmp0_other_with_cast.ttm_1))
      return false;
    if (!equals(this.utm_1, tmp0_other_with_cast.utm_1))
      return false;
    if (!equals(this.vtm_1, tmp0_other_with_cast.vtm_1))
      return false;
    if (!(this.wtm_1 === tmp0_other_with_cast.wtm_1))
      return false;
    if (!(this.xtm_1 === tmp0_other_with_cast.xtm_1))
      return false;
    if (!equals(this.ytm_1, tmp0_other_with_cast.ytm_1))
      return false;
    if (!this.ztm_1.equals(tmp0_other_with_cast.ztm_1))
      return false;
    if (!(this.atn_1 == tmp0_other_with_cast.atn_1))
      return false;
    if (!(this.btn_1 == tmp0_other_with_cast.btn_1))
      return false;
    if (!this.ctn_1.equals(tmp0_other_with_cast.ctn_1))
      return false;
    if (!(this.dtn_1 === tmp0_other_with_cast.dtn_1))
      return false;
    if (!(this.etn_1 == tmp0_other_with_cast.etn_1))
      return false;
    if (!equals(this.ftn_1, tmp0_other_with_cast.ftn_1))
      return false;
    if (!this.gtn_1.equals(tmp0_other_with_cast.gtn_1))
      return false;
    if (!equals(this.htn_1, tmp0_other_with_cast.htn_1))
      return false;
    if (!equals(this.itn_1, tmp0_other_with_cast.itn_1))
      return false;
    if (!equals(this.jtn_1, tmp0_other_with_cast.jtn_1))
      return false;
    if (!(this.ktn_1 === tmp0_other_with_cast.ktn_1))
      return false;
    if (!(this.ltn_1 === tmp0_other_with_cast.ltn_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission) {
    editableSubmission = editableSubmission === VOID ? null : editableSubmission;
    this.ltp_1 = editableSubmission;
  }
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).mtu = function (editableSubmission) {
    return new ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission);
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).toString = function () {
    return 'ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission=' + this.ltp_1 + ')';
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).hashCode = function () {
    return this.ltp_1 == null ? 0 : this.ltp_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.ltp_1, tmp0_other_with_cast.ltp_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.pu0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).uqh = function (noSubmissions, $completion) {
    var tmp = this.vqh(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.uqh((!(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.qu0_1 ? this.pu0_1.pu1_1.t2().vu1_1 : false) {
            l$ret$1: do {
              var this_0 = this.pu0_1.pu1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.du2(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).vqh = function (noSubmissions, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this.pu0_1, completion);
    i.qu0_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.uqh(noSubmissions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.mu2_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.mu2_1.dqq().r7e();
            var tmp0_safe_receiver = this.mu2_1.pu1_1.t2().nu2();
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk9_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.mu2_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.mu2_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.wu2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).zqc = function (result, $completion) {
    var tmp = this.aqd(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.zqc(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.xu2_1.gqc_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.wu2_1.pu1_1.t2().nu2();
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.sk9_1;
          this.wu2_1.yu2(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.mkn(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).aqd = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this.wu2_1, completion);
    i.xu2_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.zqc(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.hu3_1 = $commitDelay;
    this.iu3_1 = $entity;
    this.ju3_1 = $this;
    this.ku3_1 = $key;
    this.lu3_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.hu3_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.iu3_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ju3_1.pqq(this.ju3_1.jqp_1, this.ku3_1, this.lu3_1, this.iu3_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.hu3_1, this.iu3_1, this.ju3_1, this.ku3_1, this.lu3_1, completion);
    i.mu3_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.vu3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).zqc = function (result, $completion) {
    var tmp = this.aqd(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.zqc(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.wu3_1.gqc_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.vu3_1.pu1_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp3_safe_receiver = prevValue.nu2();
              var tmp_2;
              if (tmp3_safe_receiver == null) {
                tmp_2 = null;
              } else {
                var tmp0_safe_receiver = prevValue.nu2();
                var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk9_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.eka(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_4, tmp2_safe_receiver == null ? null : tmp2_safe_receiver.b7z_1);
              }
              var nextValue = prevValue.du2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.au2_1.iu4(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.vu3_1;
          var entity = newState.nu2();
          var serializer = Companion_getInstance_13().n4r();
          var commitDelay = new Long(200, 0);
          Companion_getInstance_126();
          var key = 'entityState';
          var tmp0_safe_receiver_0 = this_1.qqv_1;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            tmp0_safe_receiver_0.mr();
          }
          var tmp_6 = this_1;
          var tmp_7 = this_1.aqq();
          tmp_6.qqv_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).aqd = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this.vu3_1, completion);
    i.wu3_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.zqc(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.ru4_1 = $commitDelay;
    this.su4_1 = $entity;
    this.tu4_1 = $this;
    this.uu4_1 = $key;
    this.vu4_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.ru4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.su4_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.tu4_1.pqq(this.tu4_1.jqp_1, this.uu4_1, this.vu4_1, this.su4_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.ru4_1, this.su4_1, this.tu4_1, this.uu4_1, this.vu4_1, completion);
    i.wu4_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.fu5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).zqc = function (result, $completion) {
    var tmp = this.aqd(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.zqc(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.gu5_1.gqc_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.fu5_1.pu1_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = prevValue.au2_1.xu3_1;
              var nextValue = prevValue.du2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.au2_1.iu4(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.eka(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.fu5_1;
          var entity = newState.nu2();
          var serializer = Companion_getInstance_13().n4r();
          var commitDelay = new Long(200, 0);
          Companion_getInstance_126();
          var key = 'entityState';
          var tmp0_safe_receiver_0 = this_1.qqv_1;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            tmp0_safe_receiver_0.mr();
          }
          var tmp_2 = this_1;
          var tmp_3 = this_1.aqq();
          tmp_2.qqv_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).aqd = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this.fu5_1, completion);
    i.gu5_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.zqc(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).qu5 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.qu5(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).jo1 = function (it, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda(completion);
    i.pu5_1 = it;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.qu5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.zu5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).au6 = 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.au6($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.zu5_1.dqq());
          var assignmentUid = tmp_0.n62(520);
          var this_0 = new CourseBlock();
          var tmp_1 = this_0;
          var tmp_2 = get_doorPrimaryKeyManager(this.zu5_1.dqq());
          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.zu5_1.su1_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.zu5_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.au6($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.pu1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp = prevValue.au2_1.iu4(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.zk9_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.du2(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.ju6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).wr2 = 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.wr2((!(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.ju6_1.m4r();
          var value = this.ju6_1.pu1_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.ju6_1, completion);
    i.ku6_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.wr2($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.tu6_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.tu6_1.pu1_1, ClazzAssignmentEditViewModel$slambda$slambda$slambda_0(this.tu6_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.tu6_1, completion);
    i.uu6_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.du7_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.du7_1.gqq();
            Companion_getInstance_175();
            var tmp_1 = this.du7_1.nqq(tmp_0, 'courseBlockDesc');
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_2(this.du7_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.du7_1, completion);
    i.eu7_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.nu7_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.nu7_1.nqq(this.nu7_1.gqq(), 'groupSet');
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_4(this.nu7_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.nu7_1, completion);
    i.ou7_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.xu7_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.xu7_1.nqq(this.xu7_1.gqq(), 'peerAllocationsResult');
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_6(this.xu7_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.xu7_1, completion);
    i.yu7_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.hu8_1 = this$0;
    this.iu8_1 = $initStateJson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).ku8 = 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.ku8((!(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.hu8_1.m4r().s45(Companion_getInstance_152().n4r(), this.iu8_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.hu8_1, this.iu8_1, completion);
    i.ju8_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.ku8($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.ru1_1;
    snackDisaptcher$factory_0();
    return this_0.t2();
  }
  function hasErrors_0(_this__u8e3s4, $this) {
    return ((((((!(_this__u8e3s4.yu1_1 == null) ? true : !(_this__u8e3s4.au2_1.eu4_1 == null)) ? true : !(_this__u8e3s4.au2_1.du4_1 == null)) ? true : !(_this__u8e3s4.au2_1.gu4_1 == null)) ? true : !(_this__u8e3s4.wu1_1 == null)) ? true : !(_this__u8e3s4.zu1_1 == null)) ? true : !(_this__u8e3s4.cu2_1 == null)) ? true : _this__u8e3s4.au2_1.mu8();
  }
  function checkNoSubmissionsMade($this, $completion) {
    var tmp = $this.dqq().r7e();
    var tmp0_safe_receiver = $this.pu1_1.t2().nu2();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk9_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_134() {
    this.nu8_1 = 'groupSet';
    this.ou8_1 = 'peerAllocationsResult';
    this.pu8_1 = 'terminology';
    this.qu8_1 = 'CourseAssignmentEdit';
    this.ru8_1 = 5;
    this.su8_1 = 100;
    this.tu8_1 = 'groupSubmissionOn';
  }
  var Companion_instance_183;
  function Companion_getInstance_151() {
    return Companion_instance_183;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_17(function_0) {
    this.uu8_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_17).t1d = function (value, $completion) {
    return this.uu8_1(value, $completion);
  };
  function ClazzAssignmentEditViewModel$_init_$lambda_wdhfey(db, systemImpl) {
    return new UpdatePeerReviewAllocationUseCase(db, systemImpl);
  }
  function ClazzAssignmentEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.du9_1 = this$0;
    this.eu9_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.du9_1.oqq(this.eu9_1, 'terminology', Companion_instance_34.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.gu9_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.du9_1, null);
            suspendResult = this.du9_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzAssignmentEditViewModel$slambda$lambda(this.eu9_1, this.du9_1, this.gu9_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            Companion_getInstance_126();
            if (this.eu9_1.ba('initState') == null) {
              var tmp_3 = this;
              Companion_getInstance_126();
              tmp_3.hu9_1 = 'initState';
              this.hd_1 = 3;
              var tmp_4 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_4, ClazzAssignmentEditViewModel$slambda$slambda_4(this.du9_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.eu9_1.mql(this.hu9_1, ARGUMENT);
            this.hd_1 = 4;
            continue $sm;
          case 4:
            l$ret$1: do {
              var this_0 = this.du9_1.pu1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.iu9(true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.du9_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_5 = Companion_getInstance_98().dq9_1;
                var tmp_6 = this.du9_1.jqq().vol(strings_getInstance().amt_1);
                var nextValue_0 = prevValue_0.vq8(VOID, tmp_5, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_6, VOID, ClazzAssignmentEditViewModel$onClickSave$ref(this.du9_1)));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            launch(this.fu9_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_6(this.du9_1, null));
            launch(this.fu9_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_8(this.du9_1, null));
            launch(this.fu9_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_10(this.du9_1, null));
            launch(this.fu9_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_12(this.du9_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.du9_1, this.eu9_1, completion);
    i.fu9_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.ru9_1 = $commitDelay;
    this.su9_1 = $entity;
    this.tu9_1 = $this;
    this.uu9_1 = $key;
    this.vu9_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.ru9_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.su9_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.tu9_1.pqq(this.tu9_1.jqp_1, this.uu9_1, this.vu9_1, this.su9_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.ru9_1, this.su9_1, this.tu9_1, this.uu9_1, this.vu9_1, completion);
    i.wu9_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.fua_1 = $commitDelay;
    this.gua_1 = $entity;
    this.hua_1 = $this;
    this.iua_1 = $key;
    this.jua_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.fua_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.gua_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.hua_1.pqq(this.hua_1.jqp_1, this.iua_1, this.jua_1, this.gua_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.fua_1, this.gua_1, this.hua_1, this.iua_1, this.jua_1, completion);
    i.kua_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.tua_1 = $commitDelay;
    this.uua_1 = $entity;
    this.vua_1 = $this;
    this.wua_1 = $key;
    this.xua_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.tua_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.uua_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.vua_1.pqq(this.vua_1.jqp_1, this.wua_1, this.xua_1, this.uua_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.tua_1, this.uua_1, this.vua_1, this.wua_1, this.xua_1, completion);
    i.yua_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.pu1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.iu9(true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.hub_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_126();
            tmp_0.iub_1 = this.hub_1.jqp_1.ba('initState');
            if (this.iub_1 == null) {
              this.jub_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.kub_1 = this.iub_1;
              var tmp_2 = this;
              tmp_2.lub_1 = this.kub_1;
              this.hd_1 = 1;
              var tmp_3 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_3, ClazzAssignmentEditViewModel$onClickSave$slambda$slambda_0(this.hub_1, this.lub_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

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

            tmp_4.nub_1 = tmp_5;
            var tmp_6 = this;
            var tmp2_safe_receiver = this.hub_1.pu1_1.t2().nu2();
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.zk9_1;
            var tmp_7;
            if (tmp3_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_7 = tmp3_elvis_lhs;
            }

            tmp_6.oub_1 = tmp_7;
            var tmp_8 = this;
            var tmp4_safe_receiver = this.hub_1.pu1_1.t2().nu2();
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.sk9_1;
            var tmp_9;
            if (tmp5_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_9 = tmp5_elvis_lhs;
            }

            tmp_8.pub_1 = tmp_9;
            if (!this.oub_1.v7t_1 ? !this.oub_1.b7u_1 : false) {
              l$ret$1: do {
                var this_0 = this.hub_1.pu1_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.du2(VOID, VOID, VOID, VOID, VOID, this.hub_1.jqq().vol(strings_getInstance().hnl_1));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            }

            var it = this.pub_1.e7y_1;
            if (it == null ? true : it <= 0.0) {
              l$ret$3: do {
                var this_1 = this.hub_1.pu1_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.du2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.au2_1.iu4(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.hub_1.jqq().vol(strings_getInstance().cmp_1)));
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            if (this.pub_1.b7y_1.c7(this.pub_1.a7y_1) <= 0) {
              l$ret$5: do {
                var this_2 = this.hub_1.pu1_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.du2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_1.au2_1.iu4(VOID, VOID, VOID, VOID, VOID, VOID, this.hub_1.jqq().vol(strings_getInstance().zna_1)));
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
            }

            if (this.pub_1.d7y_1.c7(this.pub_1.b7y_1) < 0) {
              l$ret$7: do {
                var this_3 = this.hub_1.pu1_1;
                while (true) {
                  var prevValue_2 = this_3.t2();
                  var nextValue_2 = prevValue_2.du2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_2.au2_1.iu4(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.hub_1.jqq().vol(strings_getInstance().nn7_1)));
                  if (this_3.y1k(prevValue_2, nextValue_2)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
            }

            var containsArg = this.oub_1.x7t_1;
            if (!(5 <= containsArg ? containsArg <= 100 : false)) {
              l$ret$9: do {
                var this_4 = this.hub_1.pu1_1;
                while (true) {
                  var prevValue_3 = this_4.t2();
                  var nextValue_3 = prevValue_3.du2(VOID, VOID, VOID, VOID, VOID, VOID, this.hub_1.jqq().wol(strings_getInstance().pnh_1, ['5', '100']));
                  if (this_4.y1k(prevValue_3, nextValue_3)) {
                    break l$ret$9;
                  }
                }
              }
               while (false);
            }

            var this_5 = this.pub_1.x7x_1;
            if (this_5 == null ? true : isBlank(this_5)) {
              l$ret$11: do {
                var this_6 = this.hub_1.pu1_1;
                while (true) {
                  var prevValue_4 = this_6.t2();
                  var nextValue_4 = prevValue_4.du2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_4.au2_1.iu4(VOID, VOID, VOID, VOID, VOID, this.hub_1.jqq().vol(strings_getInstance().gnn_1)));
                  if (this_6.y1k(prevValue_4, nextValue_4)) {
                    break l$ret$11;
                  }
                }
              }
               while (false);
            }

            if (this.hub_1.pu1_1.t2().bu2_1 ? this.oub_1.q7t_1.equals(new Long(0, 0)) : false) {
              l$ret$13: do {
                var this_7 = this.hub_1.pu1_1;
                while (true) {
                  var prevValue_5 = this_7.t2();
                  var nextValue_5 = prevValue_5.du2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.hub_1.jqq().vol(strings_getInstance().cmp_1));
                  if (this_7.y1k(prevValue_5, nextValue_5)) {
                    break l$ret$13;
                  }
                }
              }
               while (false);
            }

            this.qub_1 = null;
            var tmp6_safe_receiver = this.nub_1.nu2();
            var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.zk9_1;
            if (!equals(tmp7_safe_receiver == null ? null : tmp7_safe_receiver.q7t_1, this.oub_1.q7t_1)) {
              this.hd_1 = 3;
              suspendResult = checkNoSubmissionsMade(this.hub_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.rub_1 = false;
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.sub_1 = suspendResult;
            this.rub_1 = !this.sub_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            if (this.rub_1) {
              this.qub_1 = this.hub_1.jqq().vol(strings_getInstance().xmj_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.nub_1.nu2();
            var tmp9_safe_receiver = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.zk9_1;
            if (!((tmp9_safe_receiver == null ? null : tmp9_safe_receiver.a7u_1) === this.oub_1.a7u_1)) {
              tmp_10 = this.qub_1 == null;
            } else {
              tmp_10 = false;
            }

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

          case 6:
            this.uub_1 = suspendResult;
            this.tub_1 = !this.uub_1;
            this.hd_1 = 7;
            continue $sm;
          case 7:
            if (this.tub_1) {
              this.qub_1 = this.hub_1.jqq().vol(strings_getInstance().xmj_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.oub_1.a7u_1;
            if (tmp_12 === 2) {
              tmp_11 = this.oub_1.g7u_1 < 1;
            } else {
              tmp_11 = false;
            }

            if (tmp_11) {
              l$ret$15: do {
                var this_8 = this.hub_1.pu1_1;
                while (true) {
                  var prevValue_6 = this_8.t2();
                  var nextValue_6 = prevValue_6.du2(VOID, VOID, VOID, this.hub_1.jqq().vol(strings_getInstance().hni_1));
                  if (this_8.y1k(prevValue_6, nextValue_6)) {
                    break l$ret$15;
                  }
                }
              }
               while (false);
            }

            this.vub_1 = this.qub_1;
            if (hasErrors_0(this.hub_1.pu1_1.t2(), this.hub_1) ? true : !(this.vub_1 == null)) {
              var tmp10_safe_receiver = this.vub_1;
              if (tmp10_safe_receiver == null)
                null;
              else {
                _get_snackDisaptcher__bp310a(this.hub_1).kq9(new Snack(tmp10_safe_receiver));
              }
              return Unit_instance;
            }

            var tmp_13;
            var tmp_14 = this.oub_1.a7u_1;
            if (tmp_14 === 2) {
              var tmp11_safe_receiver = this.nub_1.nu2();
              var tmp12_safe_receiver = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.zk9_1;
              tmp_13 = !((tmp12_safe_receiver == null ? null : tmp12_safe_receiver.g7u_1) === this.oub_1.g7u_1);
            } else {
              tmp_13 = false;
            }

            if (tmp_13) {
              this.hd_1 = 9;
              var tmp_15 = this.hub_1.ou1_1(this.hub_1.dqq(), this.hub_1.jqq());
              var tmp13_safe_receiver = this.hub_1.pu1_1.t2().nu2();
              var tmp14_elvis_lhs = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.bka_1;
              suspendResult = tmp_15.spm(tmp14_elvis_lhs == null ? emptyList() : tmp14_elvis_lhs, this.oub_1.q7t_1, this.oub_1.f7u_1, this.oub_1.n7t_1, this.oub_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.hub_1.pu1_1;
              while (true) {
                var prevValue_7 = this_9.t2();
                var tmp0_safe_receiver = prevValue_7.au2_1.xu3_1;
                var nextValue_7 = prevValue_7.du2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_7.au2_1.iu4(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.eka(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.hub_1.pu1_1;
            var tmp_16;
            var tmp_17;
            var tmp0_safe_receiver_0 = this_10.t2().nu2();
            var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.zk9_1;
            if (!equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q7t_1, new Long(0, 0))) {
              tmp_17 = !this_10.t2().bu2_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.au2_1.xu3_1;
                  var tmp_18;
                  if (tmp1_safe_receiver_0 == null) {
                    tmp_18 = null;
                  } else {
                    var tmp0_safe_receiver_1 = prevValue_8.au2_1.xu3_1.zk9_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.eka(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_19, null);
                  }
                  var nextValue_8 = prevValue_8.du2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_8.au2_1.iu4(tmp_18));
                  if (tmp15_safe_receiver.y1k(prevValue_8, nextValue_8)) {
                    break l$ret$19;
                  }
                }
              }
               while (false);
            }

            this.hub_1.uqv(this.hub_1.pu1_1.t2().nu2());
            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.hub_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.ou1_1 = peerReviewAllocationUseCaseFactory;
    var tmp_0 = this;
    var tmp0_completionCriteriaOptions = Companion_getInstance_152().lu8_1;
    var tmp1_timeZone = Companion_getInstance_9().emj().fmi();
    tmp_0.pu1_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.qu1_1 = asStateFlow(this.pu1_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.ru1_1 = Instance(this, tmp$ret$0, null).a5d(this, snackDisaptcher$factory());
    var tmp_3 = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.su1_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.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_98().cq9_1;
        var tmp1_title = this.tqw(strings_getInstance().fn7_1, strings_getInstance().gn7_1);
        var nextValue = prevValue.vq8(VOID, tmp0_loadingState, tmp1_title, VOID, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_4 = this.aqq();
    launch(tmp_4, VOID, VOID, ClazzAssignmentEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(ClazzAssignmentEditViewModel).wub = function (groupSubmissionOn) {
    this.jqp_1.mql('groupSubmissionOn', groupSubmissionOn.toString());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pu1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onGroupSubmissionOnChanged.<anonymous>' call
        var tmp;
        if (!(prevValue.cu2_1 == null) ? groupSubmissionOn : false) {
          tmp = prevValue.cu2_1;
        } else {
          tmp = null;
        }
        var nextValue = prevValue.du2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, groupSubmissionOn, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentEditViewModel).xub = function (assignment) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.pu1_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.au2_1.xu3_1;
        var tmp9_courseBlockEditUiState = prevValue.au2_1.iu4(tmp8_safe_receiver == null ? null : tmp8_safe_receiver.eka(VOID, VOID, VOID, VOID, VOID, VOID, VOID, assignment));
        var tmp;
        var tmp_0;
        if (!(prevValue.zu1_1 == null)) {
          var tmp_1 = assignment == null ? null : assignment.x7t_1;
          var tmp6_safe_receiver = prevValue.nu2();
          var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.zk9_1;
          tmp_0 = tmp_1 == (tmp7_safe_receiver == null ? null : tmp7_safe_receiver.x7t_1);
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp = prevValue.zu1_1;
        } else {
          tmp = null;
        }
        var tmp10_sizeLimitError = tmp;
        var tmp_2;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.yu1_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.yu1_1;
        } else {
          tmp_2 = null;
        }
        var tmp11_submissionRequiredError = tmp_2;
        var tmp_5;
        var tmp_6;
        var tmp_7;
        if (!(prevValue.wu1_1 == null)) {
          var tmp_8 = assignment == null ? null : assignment.g7u_1;
          var tmp1_safe_receiver = prevValue.nu2();
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zk9_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.wu1_1;
        } else {
          tmp_5 = null;
        }
        var tmp12_reviewerCountError = tmp_5;
        var nextValue = prevValue.du2(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.nu2();
    var serializer = Companion_getInstance_13().n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_126();
    var key = 'entityState';
    var tmp0_safe_receiver = this.qqv_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_10 = this;
    var tmp_11 = this.aqq();
    tmp_10.qqv_1 = launch(tmp_11, VOID, VOID, ClazzAssignmentEditViewModel$onAssignmentChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).yu2 = 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.pu1_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.nu2();
        var prevBlock = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.sk9_1;
        var tmp8_$this = prevValue.au2_1;
        var tmp1_safe_receiver = prevValue.nu2();
        var tmp9_block = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.eka(courseBlock);
        var tmp5_safe_receiver = prevValue.au2_1.xu3_1;
        var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.sk9_1;
        var tmp10_caMaxPointsError = this.uqw(tmp6_safe_receiver == null ? null : tmp6_safe_receiver.e7y_1, courseBlock.e7y_1, prevValue.au2_1.eu4_1);
        var tmp;
        var tmp_0;
        var tmp_1;
        if (!(prevValue.au2_1.du4_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.au2_1.du4_1;
        } else {
          tmp = null;
        }
        var tmp11_caDeadlineError = tmp;
        var tmp_2;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.au2_1.gu4_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.au2_1.gu4_1;
        } else {
          tmp_2 = null;
        }
        var tmp12_caGracePeriodError = tmp_2;
        var tmp2_safe_receiver = prevValue.au2_1.xu3_1;
        var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.sk9_1;
        var tmp13_caTitleError = this.uqw(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.x7x_1, courseBlock.x7x_1, prevValue.au2_1.cu4_1);
        var nextValue = prevValue.du2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp8_$this.iu4(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.nu2();
    var serializer = Companion_getInstance_13().n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_5 = this;
    var tmp_6 = this.aqq();
    tmp_5.qqv_1 = launch(tmp_6, VOID, VOID, ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).yub = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.pu1_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.au2_1.xu3_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.au2_1.xu3_1.tk9_1;
          tmp = tmp1_safe_receiver.eka(VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qkn(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.du2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.au2_1.iu4(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.nu2();
    var serializer = Companion_getInstance_13().n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.aqq();
    tmp_0.qqv_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentEditViewModel$onPictureChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).zub = function () {
    var tmp = serializer_0(StringCompanionObject_instance);
    Companion_getInstance_126();
    var tmp0_safe_receiver = this.pu1_1.t2().nu2();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk9_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.f7u_1;
    this.rqq('CourseGroups', 'groupSet', null, tmp, mapOf_0(to('clazzUid', (tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs).toString())));
  };
  protoOf(ClazzAssignmentEditViewModel).auc = function () {
    var tmp0_safe_receiver = this.pu1_1.t2().nu2();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk9_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.pu1_1.t2().nu2();
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.bka_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_126();
    var tmp_5 = to('clazzUid', assignmentVal.f7u_1.toString());
    var tmp_6 = to('numReviewers', assignmentVal.g7u_1.toString());
    Companion_getInstance_117();
    this.rqq('PeerReviewerAllocationEdit', 'peerAllocationsResult', null, tmp_0, mapOf([tmp_3, tmp_4, tmp_5, tmp_6, to('clazzAssignmentUid', assignmentVal.n7t_1.toString())]));
  };
  protoOf(ClazzAssignmentEditViewModel).vsd = function () {
    if (!this.pu1_1.t2().tu1_1)
      return Unit_instance;
    var tmp = ClazzAssignmentEditViewModel$onClickSave$lambda(this);
    this.wqw(tmp, ClazzAssignmentEditViewModel$onClickSave$slambda_0(this, null));
  };
  function Companion_135() {
    Companion_instance_184 = this;
    this.lu8_1 = listOf([CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance(), CompletionCriteria_ASSIGNMENT_GRADED_getInstance()]);
  }
  protoOf(Companion_135).n4r = function () {
    return $serializer_getInstance_74();
  };
  var Companion_instance_184;
  function Companion_getInstance_152() {
    if (Companion_instance_184 == null)
      new Companion_135();
    return Companion_instance_184;
  }
  function $serializer_62() {
    $serializer_instance_62 = 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.buc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_62).q44 = function () {
    return this.buc_1;
  };
  protoOf($serializer_62).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_76(), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_62).s44 = function (decoder) {
    var tmp0_desc = this.buc_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_76(), 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_76(), 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_62).cuc = function (encoder, value) {
    var tmp0_desc = this.buc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.tu1_1 === false)) {
      tmp1_output.o49(tmp0_desc, 0, value.tu1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.uu1_1 === true)) {
      tmp1_output.o49(tmp0_desc, 1, value.uu1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.vu1_1 === true)) {
      tmp1_output.o49(tmp0_desc, 2, value.vu1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.wu1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.wu1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.xu1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, $serializer_getInstance_10(), value.xu1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.yu1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, StringSerializer_getInstance(), value.yu1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.zu1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, StringSerializer_getInstance(), value.zu1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !value.au2_1.equals(new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_152().lu8_1))) {
      tmp1_output.y49(tmp0_desc, 7, $serializer_getInstance_76(), value.au2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.bu2_1 === false)) {
      tmp1_output.o49(tmp0_desc, 8, value.bu2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 9) ? true : !(value.cu2_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 9, StringSerializer_getInstance(), value.cu2_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_62).r44 = function (encoder, value) {
    return this.cuc(encoder, value instanceof ClazzAssignmentEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_62;
  function $serializer_getInstance_74() {
    if ($serializer_instance_62 == null)
      new $serializer_62();
    return $serializer_instance_62;
  }
  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_74().buc_1);
    }
    if (0 === (seen1 & 1))
      $this.tu1_1 = false;
    else
      $this.tu1_1 = fieldsEnabled;
    if (0 === (seen1 & 2))
      $this.uu1_1 = true;
    else
      $this.uu1_1 = markingTypeEnabled;
    if (0 === (seen1 & 4))
      $this.vu1_1 = true;
    else
      $this.vu1_1 = groupSetEnabled;
    if (0 === (seen1 & 8))
      $this.wu1_1 = null;
    else
      $this.wu1_1 = reviewerCountError;
    if (0 === (seen1 & 16))
      $this.xu1_1 = null;
    else
      $this.xu1_1 = courseTerminology;
    if (0 === (seen1 & 32))
      $this.yu1_1 = null;
    else
      $this.yu1_1 = submissionRequiredError;
    if (0 === (seen1 & 64))
      $this.zu1_1 = null;
    else
      $this.zu1_1 = sizeLimitError;
    if (0 === (seen1 & 128))
      $this.au2_1 = new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_152().lu8_1);
    else
      $this.au2_1 = courseBlockEditUiState;
    if (0 === (seen1 & 256))
      $this.bu2_1 = false;
    else
      $this.bu2_1 = groupSubmissionOn;
    if (0 === (seen1 & 512))
      $this.cu2_1 = null;
    else
      $this.cu2_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_152();
    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_152().lu8_1) : courseBlockEditUiState;
    groupSubmissionOn = groupSubmissionOn === VOID ? false : groupSubmissionOn;
    groupSetError = groupSetError === VOID ? null : groupSetError;
    this.tu1_1 = fieldsEnabled;
    this.uu1_1 = markingTypeEnabled;
    this.vu1_1 = groupSetEnabled;
    this.wu1_1 = reviewerCountError;
    this.xu1_1 = courseTerminology;
    this.yu1_1 = submissionRequiredError;
    this.zu1_1 = sizeLimitError;
    this.au2_1 = courseBlockEditUiState;
    this.bu2_1 = groupSubmissionOn;
    this.cu2_1 = groupSetError;
  }
  protoOf(ClazzAssignmentEditUiState).nu2 = function () {
    return this.au2_1.xu3_1;
  };
  protoOf(ClazzAssignmentEditUiState).duc = function () {
    var tmp0_safe_receiver = this.nu2();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk9_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.a7u_1;
    return tmp === 2;
  };
  protoOf(ClazzAssignmentEditUiState).euc = function () {
    var tmp0_safe_receiver = this.nu2();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk9_1;
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b7u_1) === true;
  };
  protoOf(ClazzAssignmentEditUiState).fuc = function () {
    var tmp0_safe_receiver = this.nu2();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk9_1;
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.v7t_1) === true;
  };
  protoOf(ClazzAssignmentEditUiState).iu9 = function (fieldsEnabled) {
    return this.du2(fieldsEnabled, VOID, VOID, VOID, VOID, VOID, VOID, this.au2_1.iu4(VOID, VOID, VOID, fieldsEnabled));
  };
  protoOf(ClazzAssignmentEditUiState).guc = 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).du2 = function (fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.tu1_1 : fieldsEnabled;
    markingTypeEnabled = markingTypeEnabled === VOID ? this.uu1_1 : markingTypeEnabled;
    groupSetEnabled = groupSetEnabled === VOID ? this.vu1_1 : groupSetEnabled;
    reviewerCountError = reviewerCountError === VOID ? this.wu1_1 : reviewerCountError;
    courseTerminology = courseTerminology === VOID ? this.xu1_1 : courseTerminology;
    submissionRequiredError = submissionRequiredError === VOID ? this.yu1_1 : submissionRequiredError;
    sizeLimitError = sizeLimitError === VOID ? this.zu1_1 : sizeLimitError;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? this.au2_1 : courseBlockEditUiState;
    groupSubmissionOn = groupSubmissionOn === VOID ? this.bu2_1 : groupSubmissionOn;
    groupSetError = groupSetError === VOID ? this.cu2_1 : groupSetError;
    return $super === VOID ? this.guc(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) : $super.guc.call(this, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError);
  };
  protoOf(ClazzAssignmentEditUiState).toString = function () {
    return 'ClazzAssignmentEditUiState(fieldsEnabled=' + this.tu1_1 + ', markingTypeEnabled=' + this.uu1_1 + ', groupSetEnabled=' + this.vu1_1 + ', reviewerCountError=' + this.wu1_1 + ', courseTerminology=' + this.xu1_1 + ', submissionRequiredError=' + this.yu1_1 + ', sizeLimitError=' + this.zu1_1 + ', courseBlockEditUiState=' + this.au2_1 + ', groupSubmissionOn=' + this.bu2_1 + ', groupSetError=' + this.cu2_1 + ')';
  };
  protoOf(ClazzAssignmentEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.tu1_1);
    result = imul(result, 31) + getBooleanHashCode(this.uu1_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vu1_1) | 0;
    result = imul(result, 31) + (this.wu1_1 == null ? 0 : getStringHashCode(this.wu1_1)) | 0;
    result = imul(result, 31) + (this.xu1_1 == null ? 0 : hashCode(this.xu1_1)) | 0;
    result = imul(result, 31) + (this.yu1_1 == null ? 0 : getStringHashCode(this.yu1_1)) | 0;
    result = imul(result, 31) + (this.zu1_1 == null ? 0 : getStringHashCode(this.zu1_1)) | 0;
    result = imul(result, 31) + this.au2_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bu2_1) | 0;
    result = imul(result, 31) + (this.cu2_1 == null ? 0 : getStringHashCode(this.cu2_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.tu1_1 === tmp0_other_with_cast.tu1_1))
      return false;
    if (!(this.uu1_1 === tmp0_other_with_cast.uu1_1))
      return false;
    if (!(this.vu1_1 === tmp0_other_with_cast.vu1_1))
      return false;
    if (!(this.wu1_1 == tmp0_other_with_cast.wu1_1))
      return false;
    if (!equals(this.xu1_1, tmp0_other_with_cast.xu1_1))
      return false;
    if (!(this.yu1_1 == tmp0_other_with_cast.yu1_1))
      return false;
    if (!(this.zu1_1 == tmp0_other_with_cast.zu1_1))
      return false;
    if (!this.au2_1.equals(tmp0_other_with_cast.au2_1))
      return false;
    if (!(this.bu2_1 === tmp0_other_with_cast.bu2_1))
      return false;
    if (!(this.cu2_1 == tmp0_other_with_cast.cu2_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.puc_1 = this$0;
    this.quc_1 = $savedStateHandle;
    this.ruc_1 = $primaryKeyManager;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).lud = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.lud(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.puc_1.oqq(this.quc_1, 'allocations', ListSerializer(Companion_instance_18.n4r()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tuc_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.suc_1.q7e().n7s(this.puc_1.mue_1, this.puc_1.pue_1, systemTimeInMillis(), this.puc_1.jqq().vol(strings_getInstance().inh_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            this.zuc_1 = this.yuc_1.e();
            var tmp_3 = this;
            tmp_3.aud_1 = this.zuc_1;
            this.bud_1 = new AssignmentSubmitterSummary(this.aud_1.e7x_1, this.aud_1.d7x_1);
            var tmp_4 = this;
            var tmp0_safe_receiver = this.tuc_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.aud_1.e7x_1)) {
                  destination.i1(element);
                }
              }
              tmp_5 = destination;
            }

            var tmp1_elvis_lhs = tmp_5;
            tmp_4.cud_1 = trimToSize(tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, this.puc_1.nue_1);
            var tmp_6 = this;
            tmp_6.dud_1 = this.puc_1.nue_1;
            if (this.cud_1.u() < this.dud_1) {
              var tmp_7 = this;
              tmp_7.fud_1 = until(this.cud_1.u(), this.dud_1);
              var tmp_8 = this;
              tmp_8.gud_1 = this.fud_1;
              var tmp_9 = this;
              tmp_9.hud_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.fud_1, 10));
              this.iud_1 = this.gud_1.w();
              this.hd_1 = 4;
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.eud_1 = this.cud_1;
              this.hd_1 = 7;
              continue $sm;
            }

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

            this.jud_1 = this.iud_1.e();
            var tmp_11 = this;
            tmp_11.kud_1 = this.jud_1;
            this.hd_1 = 5;
            suspendResult = this.ruc_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.aud_1.e7x_1, this.puc_1.oue_1);
            this.hud_1.i1(ARGUMENT_0);
            this.hd_1 = 4;
            continue $sm;
          case 6:
            var ARGUMENT_1 = this.hud_1;
            this.eud_1 = plus(this.cud_1, ARGUMENT_1);
            this.hd_1 = 7;
            continue $sm;
          case 7:
            var ARGUMENT_2 = this.eud_1;
            var ARGUMENT_3 = new AssignmentSubmitterAndAllocations(this.bud_1, ARGUMENT_2);
            this.xuc_1.i1(ARGUMENT_3);
            this.hd_1 = 3;
            continue $sm;
          case 8:
            return this.xuc_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).jo1 = function (db, completion) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda(this.puc_1, this.quc_1, this.ruc_1, completion);
    i.suc_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.lud(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).yue = 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.yue($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.yue($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.kue_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.auf(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.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_136() {
    this.buf_1 = 'allocations';
    this.cuf_1 = 'groupSetUid';
    this.duf_1 = 'numReviewers';
    this.euf_1 = 'PeerReviewerAllocationEdit';
  }
  var Companion_instance_185;
  function Companion_getInstance_153() {
    return Companion_instance_185;
  }
  function PeerReviewerAllocationEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.nuf_1 = this$0;
    this.ouf_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.quf_1 = get_doorPrimaryKeyManager(this.nuf_1.dqq());
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_getInstance_14().n4r());
            var tmp_1 = PeerReviewerAllocationEditViewModel$slambda$slambda_0(this.nuf_1, this.ouf_1, this.quf_1, null);
            var tmp_2 = PeerReviewerAllocationEditViewModel$slambda$slambda_2(null);
            suspendResult = this.nuf_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, PeerReviewerAllocationEditViewModel$slambda$lambda(this.nuf_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.nuf_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.nuf_1.jqq().vol(strings_getInstance().amt_1);
                var nextValue = prevValue.vq8(VOID, VOID, VOID, VOID, true, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, PeerReviewerAllocationEditViewModel$onClickSave$ref(this.nuf_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.nuf_1, this.ouf_1, completion);
    i.puf_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.zuf_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.zuf_1.kue_1.t2().zue_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var list = element.ukd_1;
              addAll(destination, list);
            }

            suspendResult = this.zuf_1.jue_1.rpm(destination, this.zuf_1.pue_1, this.zuf_1.mue_1, this.zuf_1.oue_1, this.zuf_1.nue_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.zuf_1.kue_1;
              while (true) {
                var prevValue = this_1.t2();
                var this_2 = prevValue.zue_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.tkd_1.r7v_1)) {
                      destination_1.i1(element_0);
                    }
                  }
                  destination_0.i1(new AssignmentSubmitterAndAllocations(item.tkd_1, destination_1));
                }
                var nextValue = prevValue.auf(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.zuf_1, completion);
    i.aug_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.jue_1 = updatePeerReviewAllocationUseCase;
    this.kue_1 = MutableStateFlow(new PeerReviewerAllocationEditUIState());
    this.lue_1 = asStateFlow(this.kue_1);
    var tmp_5 = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_5.mue_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.nue_1 = tmp1_elvis_lhs_0 == null ? 1 : tmp1_elvis_lhs_0;
    var tmp_7 = this;
    Companion_getInstance_117();
    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.oue_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.pue_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.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, this.jqq().vol(strings_getInstance().bnm_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.aqq();
    launch(tmp_9, VOID, VOID, PeerReviewerAllocationEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(PeerReviewerAllocationEditViewModel).bug = function (allocation) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.kue_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.zue_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.tkd_1.r7v_1.equals(allocation.pfu_1)) {
            tmp = item.wkd(VOID, replace_0(item.ukd_1, allocation, PeerReviewerAllocationEditViewModel$onAllocationChanged$lambda(allocation)));
          } else {
            tmp = item;
          }
          var tmp$ret$0 = tmp;
          destination.i1(tmp$ret$0);
        }
        var nextValue = prevValue.auf(destination);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PeerReviewerAllocationEditViewModel).cug = function () {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda_0(this, null));
  };
  protoOf(PeerReviewerAllocationEditViewModel).vsd = function () {
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.flatMapTo' call
    var this_0 = this.kue_1.t2().zue_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.ukd_1;
      addAll(destination, list);
    }
    this.uqv(destination);
  };
  function PeerReviewerAllocationEditUIState(submitterListWithAllocations) {
    submitterListWithAllocations = submitterListWithAllocations === VOID ? emptyList() : submitterListWithAllocations;
    this.zue_1 = submitterListWithAllocations;
  }
  protoOf(PeerReviewerAllocationEditUIState).dug = function (allocation) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.zue_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.tkd_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.ukd_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.zue_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.tkd_1.r7v_1.equals(allocation.pfu_1) ? !otherMarkersAlreadySelected.a1(element_1.tkd_1.r7v_1) : false) {
        destination_1.i1(element_1);
      }
    }
    return destination_1;
  };
  protoOf(PeerReviewerAllocationEditUIState).auf = function (submitterListWithAllocations) {
    return new PeerReviewerAllocationEditUIState(submitterListWithAllocations);
  };
  protoOf(PeerReviewerAllocationEditUIState).toString = function () {
    return 'PeerReviewerAllocationEditUIState(submitterListWithAllocations=' + this.zue_1 + ')';
  };
  protoOf(PeerReviewerAllocationEditUIState).hashCode = function () {
    return hashCode(this.zue_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.zue_1, tmp0_other_with_cast.zue_1))
      return false;
    return true;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.mug_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).oug = function (it, $completion) {
    var tmp = this.pug(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.oug((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.mug_1.muh_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vui(VOID, this.nug_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).pug = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this.mug_1, completion);
    i.nug_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.oug(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.euj_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.euj_1.fqq().p7d().ncl(this.euj_1.quh_1);
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda_0(this.euj_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.euj_1, completion);
    i.fuj_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).xtn = function (submissions, submissionFiles, $completion) {
    var tmp = this.ytn(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.xtn(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.ouj_1, this.puj_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).ytn = function (submissions, submissionFiles, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(completion);
    i.ouj_1 = submissions;
    i.puj_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.xtn(submissions, submissionFiles, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.yuj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).jto = function (it, $completion) {
    var tmp = this.kto(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.jto((!(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.yuj_1.muh_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vui(VOID, VOID, VOID, this.zuj_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).kto = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this.yuj_1, completion);
    i.zuj_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.jto(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.iuk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).vto = function (it, $completion) {
    var tmp = this.wto(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.vto((!(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.iuk_1.muh_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vui(VOID, VOID, VOID, VOID, VOID, this.juk_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).wto = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this.iuk_1, completion);
    i.juk_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.vto(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.suk_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.suk_1).roq(this.suk_1.ruh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var submitterName = suspendResult;
            l$ret$1: do {
              var this_0 = this.suk_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.vq8(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.suk_1, completion);
    i.tuk_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.cul_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.dul_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this.cul_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.cul_1, completion);
    i.dul_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.mul_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.oul_1 = this.mul_1.fqq().r7e().rc1(this.mul_1.ruh_1, this.mul_1.quh_1);
            this.pul_1 = this.mul_1.fqq().s7e().cca(this.mul_1.ruh_1, this.mul_1.quh_1);
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.oul_1, this.pul_1, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(null)));
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this.mul_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.mul_1, completion);
    i.nul_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.yul_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.yul_1.fqq().t7e().qbv(this.yul_1.ruh_1, this.yul_1.quh_1);
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_6(this.yul_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.yul_1, completion);
    i.zul_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.ium_1 = this$0;
    this.jum_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).lum = function (permissionPair, $completion) {
    var tmp = this.mum(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.lum(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.kum_1.qdo_1) {
            l$ret$1: do {
              var this_0 = this.ium_1.muh_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp0_privateCommentsList = this.ium_1.tuh_1;
                var tmp1_activeUserPersonUid = this.ium_1.bqq();
                var tmp2_activeUserSubmitterId = this.kum_1.sdo_1;
                var tmp_0;
                if (this.kum_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.kum_1.rdo_1;
                var nextValue = prevValue.vui(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.jum_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this.ium_1, null));
            launch(this.jum_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this.ium_1, null));
            launch(this.jum_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_4(this.ium_1, null));
            launch(this.jum_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_6(this.ium_1, null));
          } else {
            l$ret$3: do {
              var this_2 = this.ium_1.muh_1;
              while (true) {
                var prevValue_0 = this_2.t2();
                var tmp0_submissionList = emptyList();
                var tmp1_marks = emptyList();
                var nextValue_0 = prevValue_0.vui(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).mum = function (permissionPair, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this.ium_1, this.jum_1, completion);
    i.kum_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.lum(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation) {
    this.vum_1 = $permissionFlow;
    this.wum_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.vum_1);
            suspendResult = collectLatest(tmp_0, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda_0(this.wum_1, this.xum_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.vum_1, this.wum_1, completion);
    i.xum_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.gun_1 = $this_launch;
    this.hun_1 = $permissionFlow;
    this.iun_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.gun_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda_0(this.hun_1, this.iun_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.gun_1, this.hun_1, this.iun_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.muh_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.vui(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.uuh_1;
    assignmentSubmitterNameUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openBlobUiUseCase__fzusqz_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wuh_1;
    openBlobUiUseCase$factory_2();
    return this_0.t2();
  }
  function _get_submitMarkUseCase__y8b5kx($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xuh_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.vuh_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = $this;
    var tmp_1 = $this.aqq();
    tmp_0.vuh_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda_0($this, submissionFile, intent, null));
  }
  function Companion_137() {
    this.jun_1 = 'assignmentUid';
    this.kun_1 = 'submitterUid';
    this.lun_1 = 'CourseAssignmentSubmitter';
  }
  var Companion_instance_186;
  function Companion_getInstance_154() {
    return Companion_instance_186;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_18(function_0) {
    this.mun_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_18).t1d = function (value, $completion) {
    return this.mun_1(value, $completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$privateCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().u7e().pac(this$0.ruh_1, this$0.quh_1, false);
    };
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda(this$0, $permissionFlow, resultContinuation) {
    this.vun_1 = this$0;
    this.wun_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.vun_1.muh_1, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda_0(this.xun_1, this.wun_1, this.vun_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.vun_1, this.wun_1, completion);
    i.xun_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.guo_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.guo_1.fqq().u7e();
            var this_0 = new Comments();
            this_0.kad_1 = this.guo_1.ruh_1;
            this_0.lad_1 = this.guo_1.muh_1.t2().nui_1;
            this_0.jad_1 = this.guo_1.bqq();
            this_0.had_1 = this.guo_1.quh_1;
            this_0.gad_1 = this.guo_1.ouh_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.guo_1.ouh_1.x1k('');
            tmp_1.iuo_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.guo_1.lqq(Companion_getInstance_98().dq9_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.guo_1.lqq(Companion_getInstance_98().dq9_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.guo_1, completion);
    i.huo_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.ruo_1 = this$0;
    this.suo_1 = $assignment;
    this.tuo_1 = $draftMark;
    this.uuo_1 = $submissions;
    this.vuo_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.ruo_1);
            var tmp_1 = this.ruo_1.zqp().eoc().znw_1;
            var this_0 = this.uuo_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.jkc_1);
            }

            suspendResult = tmp_0.aop(tmp_1, this.suo_1, this.ruo_1.suh_1, this.ruo_1.ruh_1, this.tuo_1, destination, this.vuo_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.ruo_1.muh_1;
              while (true) {
                var prevValue = this_1.t2();
                var this_2 = new CourseAssignmentMark();
                this_2.lbw_1 = -1.0;
                var nextValue = prevValue.vui(VOID, VOID, VOID, VOID, VOID, VOID, this_2);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            tmp_2.xuo_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.ruo_1.hqq().kq9(new Snack('Error: ' + e.message));
              Napier_getInstance().m5e('Exception submitting mark:', e);
              tmp_4.xuo_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.ruo_1.muh_1;
              while (true) {
                var prevValue_0 = this_3.t2();
                var nextValue_0 = prevValue_0.vui(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.ruo_1.muh_1;
              while (true) {
                var prevValue_1 = this_4.t2();
                var nextValue_1 = prevValue_1.vui(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.ruo_1, this.suo_1, this.tuo_1, this.uuo_1, this.vuo_1, completion);
    i.wuo_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.gup_1 = this$0;
    this.hup_1 = $submissionFile;
    this.iup_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.kup_1 = _get_openBlobUiUseCase__fzusqz_0(this.gup_1);
            if (this.kup_1 == null) {
              this.lup_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = asBlobOpenItem(this.hup_1);
              suspendResult = this.kup_1.xor(tmp_0, ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda$lambda(this.gup_1), this.iup_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.lup_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.gup_1, this.hup_1, this.iup_1, completion);
    i.jup_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.uup_1 = this$0;
    this.vup_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.uup_1.fqq().u7e().nac(this.vup_1.fad_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.uup_1.hqq().kq9(new Snack(this.uup_1.jqq().vol(strings_getInstance().smk_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.uup_1, this.vup_1, completion);
    i.wup_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.muh_1 = MutableStateFlow(new ClazzAssignmentSubmitterDetailUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.jqq().qq7()));
    this.nuh_1 = asStateFlow(this.muh_1);
    this.ouh_1 = MutableStateFlow('');
    this.puh_1 = asStateFlow(this.ouh_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.quh_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.ruh_1 = tmp_2;
    var tmp_3 = this;
    Companion_getInstance_126();
    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.suh_1 = tmp_4;
    var tmp_5 = this;
    tmp_5.tuh_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.zqp().voc();
    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.uuh_1 = Instance(this_0, tmp$ret$3, null).a5d(this, assignmentSubmitterNameUseCase$factory());
    this.vuh_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.wuh_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.xuh_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.muh_1;
      while (true) {
        var prevValue = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.<anonymous>' call
        var tmp_14 = this.zqp().eoc().znw_1.hks();
        var tmp0_safe_receiver_2 = this.zqp().eoc().bnx_1;
        var nextValue = prevValue.vui(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.fqq().o7f().kdk(this.bqq(), this.quh_1, this.suh_1, this.ruh_1);
    var tmp_15 = this.aqq();
    launch(tmp_15, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda_0(this, permissionFlow, null));
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel).xup = function (text) {
    this.ouh_1.x1k(text);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).yup = function () {
    if (this.mqq().equals(Companion_getInstance_98().cq9_1))
      return Unit_instance;
    this.lqq(Companion_getInstance_98().cq9_1);
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).zup = function (draftMark) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.muh_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.eui_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.yuh_1;
        } else {
          tmp = null;
        }
        var tmp2_submitMarkError = tmp;
        var nextValue = prevValue.vui(tmp2_submitMarkError, VOID, VOID, VOID, VOID, VOID, draftMark);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).auq = function () {
    if (!this.muh_1.t2().buq())
      return Unit_instance;
    var tmp0_elvis_lhs = this.muh_1.t2().eui_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var draftMark = tmp;
    var submissions = this.muh_1.t2().bui_1;
    var tmp1_elvis_lhs = this.muh_1.t2().zuh_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.muh_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
          var nextValue = prevValue.vui(this.jqq().vol(strings_getInstance().cmp_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.muh_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.vui(this.jqq().vol(strings_getInstance().hni_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.muh_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.vui(this.jqq().vol(strings_getInstance().fnn_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.muh_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.vui(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
        if (this_3.y1k(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    var tmp_4 = this.aqq();
    launch(tmp_4, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda_0(this, assignment, draftMark, submissions, courseBlock, null));
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).cuq = function (option) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.muh_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickGradeFilterChip.<anonymous>' call
        var nextValue = prevValue.vui(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, option.yq9_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).ltz = function (submission) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.muh_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onToggleSubmissionExpandCollapse.<anonymous>' call
        var nextValue = prevValue.vui(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toggle_0(prevValue.sui_1, submission.kc2_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).otz = function (file) {
    openSubmissionFileAsBlob_0(this, file, OpenBlobIntent_VIEW_getInstance());
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).ptz = function (comments) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda_0(this, comments, null));
  };
  function _get_latestUniqueMarksByMarker__e0a3pq_0($this) {
    return latestUniqueMarksByMarker($this.dui_1);
  }
  function sam$kotlin_Comparator$0_1(function_0) {
    this.duq_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_1).pa = function (a, b) {
    return this.duq_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().qnm_1;
      var tmp_2 = new MessageIdOption2(tmp_1, 1);
      var tmp_3 = strings_getInstance().gn1_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.fmf(), Companion_getInstance_9().emj()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    collapsedSubmissions = collapsedSubmissions === VOID ? emptySet() : collapsedSubmissions;
    openingFileState = openingFileState === VOID ? null : openingFileState;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    this.yuh_1 = submitMarkError;
    this.zuh_1 = block;
    this.aui_1 = gradeFilterChips;
    this.bui_1 = submissionList;
    this.cui_1 = submissionAttachments;
    this.dui_1 = marks;
    this.eui_1 = draftMark;
    this.fui_1 = markSubmissionInProgress;
    this.gui_1 = markNextStudentVisible;
    this.hui_1 = fieldsEnabled;
    this.iui_1 = markListSelectedChipId;
    this.jui_1 = markListFilterOptions;
    this.kui_1 = privateCommentsList;
    this.lui_1 = newPrivateCommentTextVisible;
    this.mui_1 = activeUserPersonUid;
    this.nui_1 = activeUserSubmitterId;
    this.oui_1 = activeUserPersonName;
    this.pui_1 = activeUserPictureUri;
    this.qui_1 = localDateTimeNow;
    this.rui_1 = dayOfWeekStrings;
    this.sui_1 = collapsedSubmissions;
    this.tui_1 = openingFileState;
    this.uui_1 = showModerateOptions;
  }
  protoOf(ClazzAssignmentSubmitterDetailUiState).buq = function () {
    var tmp;
    if (!this.fui_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.zuh_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).ztz = function () {
    return submissionStatusFor(this.dui_1, this.bui_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).euq = 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).fuq = function (mark) {
    return new UstadCourseAssignmentMarkListItemUiState(mark, this.qui_1, this.rui_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).guq = function () {
    var tmp;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.dui_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.nui_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      tmp = strings_getInstance().onl_1;
    } else {
      tmp = strings_getInstance().eni_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).huq = function () {
    var tmp;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.dui_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.nui_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      tmp = strings_getInstance().pnl_1;
    } else {
      tmp = strings_getInstance().fni_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).eu0 = function () {
    var tmp;
    if (this.iui_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.dui_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).iuq = function () {
    return hasUpdatedMarks(this.dui_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).juq = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.dui_1.c1();
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).kuq = 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).vui = 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.yuh_1 : submitMarkError;
    block = block === VOID ? this.zuh_1 : block;
    gradeFilterChips = gradeFilterChips === VOID ? this.aui_1 : gradeFilterChips;
    submissionList = submissionList === VOID ? this.bui_1 : submissionList;
    submissionAttachments = submissionAttachments === VOID ? this.cui_1 : submissionAttachments;
    marks = marks === VOID ? this.dui_1 : marks;
    draftMark = draftMark === VOID ? this.eui_1 : draftMark;
    markSubmissionInProgress = markSubmissionInProgress === VOID ? this.fui_1 : markSubmissionInProgress;
    markNextStudentVisible = markNextStudentVisible === VOID ? this.gui_1 : markNextStudentVisible;
    fieldsEnabled = fieldsEnabled === VOID ? this.hui_1 : fieldsEnabled;
    markListSelectedChipId = markListSelectedChipId === VOID ? this.iui_1 : markListSelectedChipId;
    markListFilterOptions = markListFilterOptions === VOID ? this.jui_1 : markListFilterOptions;
    privateCommentsList = privateCommentsList === VOID ? this.kui_1 : privateCommentsList;
    newPrivateCommentTextVisible = newPrivateCommentTextVisible === VOID ? this.lui_1 : newPrivateCommentTextVisible;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.mui_1 : activeUserPersonUid;
    activeUserSubmitterId = activeUserSubmitterId === VOID ? this.nui_1 : activeUserSubmitterId;
    activeUserPersonName = activeUserPersonName === VOID ? this.oui_1 : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? this.pui_1 : activeUserPictureUri;
    localDateTimeNow = localDateTimeNow === VOID ? this.qui_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.rui_1 : dayOfWeekStrings;
    collapsedSubmissions = collapsedSubmissions === VOID ? this.sui_1 : collapsedSubmissions;
    openingFileState = openingFileState === VOID ? this.tui_1 : openingFileState;
    showModerateOptions = showModerateOptions === VOID ? this.uui_1 : showModerateOptions;
    return $super === VOID ? this.kuq(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) : $super.kuq.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.yuh_1 + ', block=' + this.zuh_1 + ', gradeFilterChips=' + this.aui_1 + ', submissionList=' + this.bui_1 + ', submissionAttachments=' + this.cui_1 + ', marks=' + this.dui_1 + ', draftMark=' + this.eui_1 + ', markSubmissionInProgress=' + this.fui_1 + ', markNextStudentVisible=' + this.gui_1 + ', fieldsEnabled=' + this.hui_1 + ', markListSelectedChipId=' + this.iui_1 + ', markListFilterOptions=' + this.jui_1 + ', privateCommentsList=' + this.kui_1 + ', newPrivateCommentTextVisible=' + this.lui_1 + ', activeUserPersonUid=' + this.mui_1.toString() + ', activeUserSubmitterId=' + this.nui_1.toString() + ', activeUserPersonName=' + this.oui_1 + ', activeUserPictureUri=' + this.pui_1 + ', localDateTimeNow=' + this.qui_1 + ', dayOfWeekStrings=' + this.rui_1 + ', collapsedSubmissions=' + this.sui_1 + ', openingFileState=' + this.tui_1 + ', showModerateOptions=' + this.uui_1 + ')';
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).hashCode = function () {
    var result = this.yuh_1 == null ? 0 : getStringHashCode(this.yuh_1);
    result = imul(result, 31) + (this.zuh_1 == null ? 0 : this.zuh_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.aui_1) | 0;
    result = imul(result, 31) + hashCode(this.bui_1) | 0;
    result = imul(result, 31) + hashCode(this.cui_1) | 0;
    result = imul(result, 31) + hashCode(this.dui_1) | 0;
    result = imul(result, 31) + (this.eui_1 == null ? 0 : hashCode(this.eui_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fui_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gui_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hui_1) | 0;
    result = imul(result, 31) + this.iui_1 | 0;
    result = imul(result, 31) + hashCode(this.jui_1) | 0;
    result = imul(result, 31) + hashCode(this.kui_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lui_1) | 0;
    result = imul(result, 31) + this.mui_1.hashCode() | 0;
    result = imul(result, 31) + this.nui_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.oui_1) | 0;
    result = imul(result, 31) + (this.pui_1 == null ? 0 : getStringHashCode(this.pui_1)) | 0;
    result = imul(result, 31) + this.qui_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.rui_1) | 0;
    result = imul(result, 31) + hashCode(this.sui_1) | 0;
    result = imul(result, 31) + (this.tui_1 == null ? 0 : this.tui_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uui_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.yuh_1 == tmp0_other_with_cast.yuh_1))
      return false;
    if (!equals(this.zuh_1, tmp0_other_with_cast.zuh_1))
      return false;
    if (!equals(this.aui_1, tmp0_other_with_cast.aui_1))
      return false;
    if (!equals(this.bui_1, tmp0_other_with_cast.bui_1))
      return false;
    if (!equals(this.cui_1, tmp0_other_with_cast.cui_1))
      return false;
    if (!equals(this.dui_1, tmp0_other_with_cast.dui_1))
      return false;
    if (!equals(this.eui_1, tmp0_other_with_cast.eui_1))
      return false;
    if (!(this.fui_1 === tmp0_other_with_cast.fui_1))
      return false;
    if (!(this.gui_1 === tmp0_other_with_cast.gui_1))
      return false;
    if (!(this.hui_1 === tmp0_other_with_cast.hui_1))
      return false;
    if (!(this.iui_1 === tmp0_other_with_cast.iui_1))
      return false;
    if (!equals(this.jui_1, tmp0_other_with_cast.jui_1))
      return false;
    if (!equals(this.kui_1, tmp0_other_with_cast.kui_1))
      return false;
    if (!(this.lui_1 === tmp0_other_with_cast.lui_1))
      return false;
    if (!this.mui_1.equals(tmp0_other_with_cast.mui_1))
      return false;
    if (!this.nui_1.equals(tmp0_other_with_cast.nui_1))
      return false;
    if (!(this.oui_1 === tmp0_other_with_cast.oui_1))
      return false;
    if (!(this.pui_1 == tmp0_other_with_cast.pui_1))
      return false;
    if (!this.qui_1.equals(tmp0_other_with_cast.qui_1))
      return false;
    if (!equals(this.rui_1, tmp0_other_with_cast.rui_1))
      return false;
    if (!equals(this.sui_1, tmp0_other_with_cast.sui_1))
      return false;
    if (!equals(this.tui_1, tmp0_other_with_cast.tui_1))
      return false;
    if (!(this.uui_1 === tmp0_other_with_cast.uui_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.eqy_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.aur(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.jur_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).lur = function (nameAndTerminology, $completion) {
    var tmp = this.mur(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.lur((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.jur_1.eqy_1.t2().xuq_1;
          var tmp0_safe_receiver = this.kur_1;
          var tmp2_terminology = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u8l_1;
          var tmp3_json = this.jur_1.m4r();
          var tmp4_systemImpl = this.jur_1.jqq();
          parseAndUpdateTerminologyStringsIfNeeded(tmp1_currentTerminologyStrings, tmp2_terminology, tmp4_systemImpl, tmp3_json, ClazzMemberListViewModel$slambda$slambda$slambda$slambda$lambda(this.jur_1));
          l$ret$1: do {
            var this_0 = this.jur_1.nqp_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver_0 = this.kur_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.t8l_1;
              var nextValue = prevValue.vq8(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).mur = function (nameAndTerminology, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this.jur_1, completion);
    i.kur_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.lur(nameAndTerminology, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.vur_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).htb = function (it, $completion) {
    var tmp = this.itb(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.htb(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.vur_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.aur(VOID, VOID, VOID, VOID, this.wur_1.hdn_1, this.wur_1.idn_1, this.wur_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).itb = function (it, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this.vur_1, completion);
    i.wur_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.htb(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.fus_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.fus_1.fqq().o7d().a8d(this.fus_1.jut_1);
            var tmp_1 = ClazzMemberListViewModel$slambda$slambda$slambda$slambda_0(this.fus_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.fus_1, completion);
    i.gus_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.wut_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.wut_1.dqq().o7f();
            var tmp_1 = this.wut_1.bqq();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(16, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.gdk(tmp_1, this.wut_1.jut_1, tmp_2, new Long(8, 0)));
            var tmp_4 = ClazzMemberListViewModel$slambda$slambda$slambda$slambda_2(this.wut_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.wut_1, completion);
    i.xut_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.guu_1 = this$0;
    this.huu_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.guu_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.aur(VOID, VOID, VOID, this.guu_1.mut_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          launch(this.huu_1, VOID, VOID, ClazzMemberListViewModel$slambda$slambda$slambda_0(this.guu_1, null));
          launch(this.huu_1, VOID, VOID, ClazzMemberListViewModel$slambda$slambda$slambda_2(this.guu_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.guu_1, this.huu_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.quu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).erl = function (it, $completion) {
    var tmp = this.jo1(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.erl(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.ruu_1.o7d().s8c(this.quu_1.jut_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).jo1 = function (it, completion) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this.quu_1, completion);
    i.ruu_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.erl(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_sendClazzInvitesUseCase__utu0z8_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hut_1;
    sendClazzInvitesUseCase$factory_2();
    return this_0.t2();
  }
  function _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.iut_1;
    approveOrDeclinePendingEnrolmentUseCase$factory_0();
    return this_0.t2();
  }
  function getMembersAsPagingSource($this, roleId) {
    var tmp0_$this = $this.fqq().t7d();
    var tmp1_clazzUid = $this.jut_1;
    var tmp2_sortOrder = $this.eqy_1.t2().tuq_1.cqf_1;
    var tmp3_filter = $this.eqy_1.t2().vuq_1;
    var tmp4_searchText = toQueryLikeParam($this.nqp_1.t2().nq8_1.cq8_1);
    var tmp5_accountPersonUid = $this.bqq();
    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_138() {
    this.suu_1 = 'CourseMembers';
  }
  var Companion_instance_187;
  function Companion_getInstance_155() {
    return Companion_instance_187;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_19(function_0) {
    this.tuu_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_19).t1d = function (value, $completion) {
    return this.tuu_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.fqq().e7g().m9m(this$0.zqp().eoc().ynw_1.bil_1, this$0.jut_1, systemTimeInMillis());
    };
  }
  function ClazzMemberListViewModel$pendingStudentListPagingSource$lambda(this$0) {
    return function () {
      var tmp0_$this = this$0.fqq().n7f();
      var tmp1_clazzUid = this$0.jut_1;
      var tmp2_searchText = toQueryLikeParam(this$0.nqp_1.t2().nq8_1.cq8_1);
      var tmp4_sortOrder = this$0.eqy_1.t2().tuq_1.cqf_1;
      return tmp0_$this.vex(tmp1_clazzUid, false, 1, tmp2_searchText, tmp4_sortOrder);
    };
  }
  function ClazzMemberListViewModel$slambda(this$0, resultContinuation) {
    this.cuv_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.cuv_1.eqy_1, ClazzMemberListViewModel$slambda$slambda_0(this.cuv_1, this.duv_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.cuv_1, completion);
    i.duv_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.muv_1 = this$0;
    this.nuv_1 = $enrolmentDetails;
    this.ouv_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.muv_1).lp2(this.nuv_1, this.ouv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this.muv_1.hqq();
            var tmp_1 = this.muv_1.jqq();
            var tmp_2 = this.ouv_1 ? strings_getInstance().tno_1 : strings_getInstance().uno_1;
            var tmp0_elvis_lhs = this.nuv_1.oey_1;
            tmp_0.kq9(new Snack(tmp_1.wol(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.muv_1.hqq();
              var tmp_5 = this.muv_1.jqq().vol(strings_getInstance().xmj_1);
              var tmp1_elvis_lhs = e.message;
              tmp_4.kq9(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.muv_1, this.nuv_1, this.ouv_1, completion);
    i.puv_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.yuv_1 = this$0;
    this.zuv_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.yuv_1.eqq();
            var tmp_1;
            if (this.zuv_1 === 1000) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

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

          case 1:
            this.cuw_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var clazzCode = this.cuw_1;
            var tmp_2;
            if (this.zuv_1 === 1000) {
              tmp_2 = strings_getInstance().amn_1;
            } else {
              tmp_2 = strings_getInstance().cn0_1;
            }

            var titleStringResource = tmp_2;
            var tmp1_safe_receiver = this.yuv_1.eqy_1.t2().xuq_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.xqa(titleStringResource);
            var title = tmp2_elvis_lhs == null ? this.yuv_1.jqq().vol(titleStringResource) : tmp2_elvis_lhs;
            Companion_getInstance_117();
            var tmp_3 = to('clazzUid', this.yuv_1.jut_1.toString());
            Companion_getInstance_117();
            var tmp_4 = to('popUpToOnFinish', this.yuv_1.kqp_1);
            var goToOnPersonSelectedArg = appendQueryArgs('EnrolmentEdit', mapOf([tmp_3, tmp_4, to('role', this.zuv_1.toString())]));
            var this_1 = LinkedHashMap_init_$Create$();
            Companion_getInstance_206();
            this_1.s('exlcudeFromClazz', this.yuv_1.jut_1.toString());
            Companion_getInstance_117();
            this_1.s('listMode', ListViewMode_PICKER_getInstance().iqm_1);
            this_1.s('goToOnPersonSelected', goToOnPersonSelectedArg);
            Companion_getInstance_206();
            this_1.s('showAddViaContact', 'true');
            Companion_getInstance_206();
            this_1.s('role', this.zuv_1.toString());
            Companion_getInstance_126();
            this_1.s('t', title);
            Companion_getInstance_206();
            PermissionFlags_getInstance();
            this_1.s('rptsl', (new Long(2048, 0)).toString());
            if (!(clazzCode == null)) {
              Companion_getInstance_206();
              this_1.s('showAddViaInviteLink', clazzCode);
            }

            var args = this_1.f3();
            Companion_getInstance_206();
            this.yuv_1.lqp_1.wp8('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.yuv_1, this.zuv_1, completion);
    i.auw_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.luw_1 = this$0;
    this.muw_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.luw_1.fqq().e7g().n9m(this.muw_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.luw_1, this.muw_1, completion);
    i.nuw_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.wuw_1 = this$0;
    this.xuw_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.wuw_1).vpj(new SendClazzInvitesRequest(listOf_0(this.xuw_1.h9n_1), this.xuw_1.f9n_1, this.xuw_1.e9n_1, this.wuw_1.zqp().eoc().znw_1.f96_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wuw_1.hqq().kq9(new Snack(this.wuw_1.jqq().vol(strings_getInstance().xnt_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.wuw_1, this.xuw_1, completion);
    i.yuw_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.hut_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.zqp().voc();
    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.iut_1 = Instance(this_1, tmp$ret$5, null).a5d(this, approveOrDeclinePendingEnrolmentUseCase$factory());
    var tmp_6 = this;
    Companion_getInstance_117();
    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.jut_1 = tmp_7;
    var tmp_8 = this;
    tmp_8.kut_1 = ClazzMemberListViewModel$teacherListPagingSource$lambda(this);
    var tmp_9 = this;
    tmp_9.lut_1 = ClazzMemberListViewModel$studentListPagingSource$lambda(this);
    var tmp_10 = this;
    tmp_10.mut_1 = ClazzMemberListViewModel$pendingInvitesPagingSource$lambda(this);
    var tmp_11 = this;
    tmp_11.nut_1 = ClazzMemberListViewModel$pendingStudentListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.eqy_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.jqq().vol(get_dayStringResource(element));
          result.s(element, tmp$ret$7);
        }
        var nextValue = prevValue.aur(this.lut_1, this.kut_1, this.nut_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.nqp_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.vq8(VOID, VOID, VOID, true, VOID, VOID, VOID, this.nqz(), new ActionBarButtonUiState(false));
        if (this_4.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_12 = this.aqq();
    launch(tmp_12, VOID, VOID, ClazzMemberListViewModel$slambda_0(this, null));
  }
  protoOf(ClazzMemberListViewModel).yqy = function (searchText) {
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).zqy = function () {
  };
  protoOf(ClazzMemberListViewModel).jt3 = function (filterOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.onClickFilterChip.<anonymous>' call
        var nextValue = prevValue.aur(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, filterOption.yq9_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).zuw = function (enrolmentDetails, approved) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda_0(this, enrolmentDetails, approved, null));
  };
  protoOf(ClazzMemberListViewModel).aux = function (role) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickAddNewMember$slambda_0(this, role, null));
  };
  protoOf(ClazzMemberListViewModel).bux = function (entry) {
    Companion_getInstance_117();
    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_117();
    this.lqp_1.wp8('CourseEnrolments', mapOf([tmp, to('clazzUid', this.jut_1.toString())]));
  };
  protoOf(ClazzMemberListViewModel).it3 = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.aur(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).cux = function (contact) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickRevokeInvite$slambda_0(this, contact, null));
  };
  protoOf(ClazzMemberListViewModel).dux = function (clazzInvite) {
    var tmp = this.aqq();
    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().jml_1;
      var tmp_5 = new SortOrderOption(tmp_4, 1, true);
      var tmp_6 = strings_getInstance().jml_1;
      var tmp_7 = new SortOrderOption(tmp_6, 2, false);
      var tmp_8 = strings_getInstance().iml_1;
      var tmp_9 = new SortOrderOption(tmp_8, 3, true);
      var tmp_10 = strings_getInstance().iml_1;
      var tmp_11 = new SortOrderOption(tmp_10, 4, false);
      var tmp_12 = strings_getInstance().wmy_1;
      var tmp_13 = new SortOrderOption(tmp_12, 7, true);
      var tmp_14 = strings_getInstance().wmy_1;
      var tmp_15 = new SortOrderOption(tmp_14, 8, false);
      var tmp_16 = strings_getInstance().xmy_1;
      var tmp_17 = new SortOrderOption(tmp_16, 9, true);
      var tmp_18 = strings_getInstance().xmy_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().nn1_1;
      tmp_20 = listOf([new MessageIdOption2(tmp_21, 1), new MessageIdOption2(strings_getInstance().gn1_1, 0)]);
    } else {
      tmp_20 = filterOptions;
    }
    filterOptions = tmp_20;
    terminologyStrings = terminologyStrings === VOID ? null : terminologyStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.fmf(), Companion_getInstance_9().emj()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.luq_1 = studentList;
    this.muq_1 = teacherList;
    this.nuq_1 = pendingStudentList;
    this.ouq_1 = pendingInviteList;
    this.puq_1 = addTeacherVisible;
    this.quq_1 = addStudentVisible;
    this.ruq_1 = pendingInviteListVisible;
    this.suq_1 = sortOptions;
    this.tuq_1 = activeSortOrderOption;
    this.uuq_1 = fieldsEnabled;
    this.vuq_1 = selectedChipId;
    this.wuq_1 = filterOptions;
    this.xuq_1 = terminologyStrings;
    this.yuq_1 = localDateTimeNow;
    this.zuq_1 = dayOfWeekStrings;
  }
  protoOf(ClazzMemberListUiState).eux = 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).aur = function (studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings, $super) {
    studentList = studentList === VOID ? this.luq_1 : studentList;
    teacherList = teacherList === VOID ? this.muq_1 : teacherList;
    pendingStudentList = pendingStudentList === VOID ? this.nuq_1 : pendingStudentList;
    pendingInviteList = pendingInviteList === VOID ? this.ouq_1 : pendingInviteList;
    addTeacherVisible = addTeacherVisible === VOID ? this.puq_1 : addTeacherVisible;
    addStudentVisible = addStudentVisible === VOID ? this.quq_1 : addStudentVisible;
    pendingInviteListVisible = pendingInviteListVisible === VOID ? this.ruq_1 : pendingInviteListVisible;
    sortOptions = sortOptions === VOID ? this.suq_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? this.tuq_1 : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? this.uuq_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.vuq_1 : selectedChipId;
    filterOptions = filterOptions === VOID ? this.wuq_1 : filterOptions;
    terminologyStrings = terminologyStrings === VOID ? this.xuq_1 : terminologyStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.yuq_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.zuq_1 : dayOfWeekStrings;
    return $super === VOID ? this.eux(studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) : $super.eux.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.luq_1 + ', teacherList=' + this.muq_1 + ', pendingStudentList=' + this.nuq_1 + ', pendingInviteList=' + this.ouq_1 + ', addTeacherVisible=' + this.puq_1 + ', addStudentVisible=' + this.quq_1 + ', pendingInviteListVisible=' + this.ruq_1 + ', sortOptions=' + this.suq_1 + ', activeSortOrderOption=' + this.tuq_1 + ', fieldsEnabled=' + this.uuq_1 + ', selectedChipId=' + this.vuq_1 + ', filterOptions=' + this.wuq_1 + ', terminologyStrings=' + this.xuq_1 + ', localDateTimeNow=' + this.yuq_1 + ', dayOfWeekStrings=' + this.zuq_1 + ')';
  };
  protoOf(ClazzMemberListUiState).hashCode = function () {
    var result = hashCode(this.luq_1);
    result = imul(result, 31) + hashCode(this.muq_1) | 0;
    result = imul(result, 31) + hashCode(this.nuq_1) | 0;
    result = imul(result, 31) + hashCode(this.ouq_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.puq_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.quq_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ruq_1) | 0;
    result = imul(result, 31) + hashCode(this.suq_1) | 0;
    result = imul(result, 31) + this.tuq_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uuq_1) | 0;
    result = imul(result, 31) + this.vuq_1 | 0;
    result = imul(result, 31) + hashCode(this.wuq_1) | 0;
    result = imul(result, 31) + (this.xuq_1 == null ? 0 : this.xuq_1.hashCode()) | 0;
    result = imul(result, 31) + this.yuq_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.zuq_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.luq_1, tmp0_other_with_cast.luq_1))
      return false;
    if (!equals(this.muq_1, tmp0_other_with_cast.muq_1))
      return false;
    if (!equals(this.nuq_1, tmp0_other_with_cast.nuq_1))
      return false;
    if (!equals(this.ouq_1, tmp0_other_with_cast.ouq_1))
      return false;
    if (!(this.puq_1 === tmp0_other_with_cast.puq_1))
      return false;
    if (!(this.quq_1 === tmp0_other_with_cast.quq_1))
      return false;
    if (!(this.ruq_1 === tmp0_other_with_cast.ruq_1))
      return false;
    if (!equals(this.suq_1, tmp0_other_with_cast.suq_1))
      return false;
    if (!this.tuq_1.equals(tmp0_other_with_cast.tuq_1))
      return false;
    if (!(this.uuq_1 === tmp0_other_with_cast.uuq_1))
      return false;
    if (!(this.vuq_1 === tmp0_other_with_cast.vuq_1))
      return false;
    if (!equals(this.wuq_1, tmp0_other_with_cast.wuq_1))
      return false;
    if (!equals(this.xuq_1, tmp0_other_with_cast.xuq_1))
      return false;
    if (!this.yuq_1.equals(tmp0_other_with_cast.yuq_1))
      return false;
    if (!equals(this.zuq_1, tmp0_other_with_cast.zuq_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.nux_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).rux = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.rux(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.oux_1.t7d();
            var tmp_1;
            if (!this.nux_1.rqv_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.pux_1 = tmp_1;
            if (this.pux_1 == null) {
              this.qux_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.pux_1.f93(this.nux_1.rqv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.qux_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.qux_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).jo1 = function (db, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda(this.nux_1, completion);
    i.oux_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.rux(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.auy_1 = $savedStateHandle;
    this.buy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).euy = 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.euy($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.cuy_1 = new ClazzEnrolmentWithLeavingReason();
            var tmp_1 = this;
            tmp_1.duy_1 = this.cuy_1;
            var tmp_2 = this.duy_1;
            Companion_getInstance_117();
            var tmp0_safe_receiver = this.auy_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.duy_1;
            Companion_getInstance_117();
            var tmp2_safe_receiver = this.auy_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.duy_1.e8i_1 = systemTimeInMillis();
            var tmp_6 = this.duy_1;
            var tmp4_safe_receiver = this.auy_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.buy_1.fqq().o7d().c8d(this.duy_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.duy_1.s94_1 = ARGUMENT;
            return this.cuy_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.auy_1, this.buy_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.euy($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.cuz_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.muz(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.vuz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).xuz = 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.xuz((!(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.vuz_1.fqq().q7d();
            var tmp0_safe_receiver = this.vuz_1.cuz_1.t2().fuz_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.vuz_1, completion);
    i.wuz_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.xuz($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function _get_enrolIntoCourseUseCase__jh2n4b($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.euz_1;
    enrolIntoCourseUseCase$factory_0();
    return this_0.t2();
  }
  function hasErrors_1(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.guz_1 == null) ? true : !(_this__u8e3s4.huz_1 == null)) ? true : !(_this__u8e3s4.iuz_1 == null);
  }
  function Companion_139() {
    this.yuz_1 = 'EnrolmentEdit';
    this.zuz_1 = 'role';
  }
  var Companion_instance_188;
  function Companion_getInstance_156() {
    return Companion_instance_188;
  }
  function ClazzEnrolmentEditViewModel$slambda(this$0, resultContinuation) {
    this.iv0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda).hsg = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).he = function (p1, $completion) {
    return this.hsg(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.jv0_1.o7f().edk(this.iv0_1.bqq(), this.iv0_1.rqv_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).jo1 = function (db, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda(this.iv0_1, completion);
    i.jv0_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.hsg(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.sv0_1 = this$0;
    this.tv0_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.sv0_1, null);
            var tmp_2 = ClazzEnrolmentEditViewModel$slambda$slambda_2(this.tv0_1, this.sv0_1, null);
            suspendResult = this.sv0_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzEnrolmentEditViewModel$slambda$lambda(this.sv0_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_3 = this.sv0_1.dqq().o7f();
            var tmp_4 = this.sv0_1.bqq();
            var tmp0_safe_receiver = this.sv0_1.cuz_1.t2().fuz_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.vv0_1 = suspendResult;
            this.wv0_1 = this.vv0_1.y6();
            this.xv0_1 = this.vv0_1.z6();
            var tmp_7 = this;
            tmp_7.yv0_1 = async(this.uv0_1, VOID, VOID, ClazzEnrolmentEditViewModel$slambda$slambda_4(this.sv0_1, null));
            var tmp_8 = this;
            var this_0 = ArrayList_init_$Create$();
            if (this.wv0_1) {
              this_0.i1(1000);
            }

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

            tmp_8.zv0_1 = this_0.f3();
            this.hd_1 = 3;
            suspendResult = this.yv0_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.sv0_1.jqq(), this.sv0_1.m4r());
            }

            var terminologyStrings = tmp_9;
            l$ret$1: do {
              var this_1 = this.sv0_1.cuz_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.muz(VOID, VOID, VOID, VOID, true, terminologyStrings, this.zv0_1);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_2 = this.sv0_1.nqp_1;
              while (true) {
                var prevValue_0 = this_2.t2();
                var tmp_10 = Companion_getInstance_98().dq9_1;
                var tmp_11 = this.sv0_1.jqq().vol(strings_getInstance().on4_1);
                var nextValue_0 = prevValue_0.vq8(VOID, tmp_10, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_11, VOID, ClazzEnrolmentEditViewModel$onClickSave$ref(this.sv0_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.sv0_1, this.tv0_1, completion);
    i.uv0_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.iv1_1 = $commitDelay;
    this.jv1_1 = $entity;
    this.kv1_1 = $this;
    this.lv1_1 = $key;
    this.mv1_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.iv1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.jv1_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.kv1_1.pqq(this.kv1_1.jqp_1, this.lv1_1, this.mv1_1, this.jv1_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.iv1_1, this.jv1_1, this.kv1_1, this.lv1_1, this.mv1_1, completion);
    i.nv1_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.wv1_1 = this$0;
    this.xv1_1 = $entity;
    this.yv1_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.wv1_1.rqv_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = _get_enrolIntoCourseUseCase__jh2n4b(this.wv1_1).xp1(this.xv1_1, this.yv1_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.wv1_1.dqq().t7d().g93(this.xv1_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_117();
            var popUpToOnFinish = this.wv1_1.jqp_1.ba('popUpToOnFinish');
            if (!(popUpToOnFinish == null)) {
              this.wv1_1.lqp_1.vqb(popUpToOnFinish, false);
            } else {
              this.wv1_1.uqv(this.xv1_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.wv1_1, this.xv1_1, this.yv1_1, completion);
    i.zv1_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.cuz_1 = MutableStateFlow(new ClazzEnrolmentEditUiState(VOID, VOID, VOID, VOID, false));
    this.duz_1 = asStateFlow(this.cuz_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.euz_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.nqp_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, Companion_getInstance_98().cq9_1, this.tqw(strings_getInstance().gmz_1, strings_getInstance().fmz_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = ClazzEnrolmentEditViewModel$slambda_0(this, null);
    this.vqq(tmp_1, VOID, VOID, ClazzEnrolmentEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(ClazzEnrolmentEditViewModel).av2 = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.cuz_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.fuz_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g8i_1;
        var tmp_0 = this.uqw(tmp, entity == null ? null : entity.g8i_1, prevValue.guz_1);
        var tmp2_safe_receiver = prevValue.fuz_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.e8i_1;
        var nextValue = prevValue.muz(entity, tmp_0, this.uqw(tmp_1, entity == null ? null : entity.e8i_1, prevValue.huz_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_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.aqq();
    tmp_2.qqv_1 = launch(tmp_3, VOID, VOID, ClazzEnrolmentEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzEnrolmentEditViewModel).vsd = function () {
    if (this.mqq().equals(Companion_getInstance_98().cq9_1))
      return Unit_instance;
    var tmp0_elvis_lhs = this.cuz_1.t2().fuz_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.hqq().kq9(new Snack('Error: no time zone for course'));
      return Unit_instance;
    }
    this.lqq(Companion_getInstance_98().cq9_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.cuz_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.muz(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.cuz_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.muz(VOID, this.jqq().vol(strings_getInstance().cmp_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.cuz_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.muz(VOID, VOID, this.jqq().vol(strings_getInstance().cmp_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.cuz_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.muz(VOID, VOID, VOID, this.jqq().vol(strings_getInstance().zna_1));
          if (this_3.y1k(prevValue_2, nextValue_2)) {
            break $l$block_2;
          }
        }
      }
    }
    if (hasErrors_1(this.cuz_1.t2(), this)) {
      $l$block_3: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.cuz_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.muz(VOID, VOID, VOID, VOID, true);
          if (this_4.y1k(prevValue_3, nextValue_3)) {
            break $l$block_3;
          }
        }
      }
      return Unit_instance;
    }
    var tmp_0 = this.aqq();
    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.fuz_1 = clazzEnrolment;
    this.guz_1 = roleSelectedError;
    this.huz_1 = startDateError;
    this.iuz_1 = endDateError;
    this.juz_1 = fieldsEnabled;
    this.kuz_1 = courseTerminology;
    this.luz_1 = roleOptions;
  }
  protoOf(ClazzEnrolmentEditUiState).bv2 = function () {
    var tmp0_safe_receiver = this.fuz_1;
    var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g8i_1;
    return tmp === 1000;
  };
  protoOf(ClazzEnrolmentEditUiState).cv2 = function (clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) {
    return new ClazzEnrolmentEditUiState(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions);
  };
  protoOf(ClazzEnrolmentEditUiState).muz = function (clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions, $super) {
    clazzEnrolment = clazzEnrolment === VOID ? this.fuz_1 : clazzEnrolment;
    roleSelectedError = roleSelectedError === VOID ? this.guz_1 : roleSelectedError;
    startDateError = startDateError === VOID ? this.huz_1 : startDateError;
    endDateError = endDateError === VOID ? this.iuz_1 : endDateError;
    fieldsEnabled = fieldsEnabled === VOID ? this.juz_1 : fieldsEnabled;
    courseTerminology = courseTerminology === VOID ? this.kuz_1 : courseTerminology;
    roleOptions = roleOptions === VOID ? this.luz_1 : roleOptions;
    return $super === VOID ? this.cv2(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) : $super.cv2.call(this, clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions);
  };
  protoOf(ClazzEnrolmentEditUiState).toString = function () {
    return 'ClazzEnrolmentEditUiState(clazzEnrolment=' + this.fuz_1 + ', roleSelectedError=' + this.guz_1 + ', startDateError=' + this.huz_1 + ', endDateError=' + this.iuz_1 + ', fieldsEnabled=' + this.juz_1 + ', courseTerminology=' + this.kuz_1 + ', roleOptions=' + this.luz_1 + ')';
  };
  protoOf(ClazzEnrolmentEditUiState).hashCode = function () {
    var result = this.fuz_1 == null ? 0 : hashCode(this.fuz_1);
    result = imul(result, 31) + (this.guz_1 == null ? 0 : getStringHashCode(this.guz_1)) | 0;
    result = imul(result, 31) + (this.huz_1 == null ? 0 : getStringHashCode(this.huz_1)) | 0;
    result = imul(result, 31) + (this.iuz_1 == null ? 0 : getStringHashCode(this.iuz_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.juz_1) | 0;
    result = imul(result, 31) + (this.kuz_1 == null ? 0 : this.kuz_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.luz_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.fuz_1, tmp0_other_with_cast.fuz_1))
      return false;
    if (!(this.guz_1 == tmp0_other_with_cast.guz_1))
      return false;
    if (!(this.huz_1 == tmp0_other_with_cast.huz_1))
      return false;
    if (!(this.iuz_1 == tmp0_other_with_cast.iuz_1))
      return false;
    if (!(this.juz_1 === tmp0_other_with_cast.juz_1))
      return false;
    if (!equals(this.kuz_1, tmp0_other_with_cast.kuz_1))
      return false;
    if (!equals(this.luz_1, tmp0_other_with_cast.luz_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.lv2_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).prq = function (value, $completion) {
    var tmp = this.qrq(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.prq(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.nv2_1 = this.lv2_1;
            var tmp_1 = this;
            tmp_1.ov2_1 = this.mv2_1;
            this.hd_1 = 1;
            var it = this.ov2_1;
            suspendResult = this.nv2_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).qrq = function (value, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$o$collect$slambda(this.lv2_1, completion);
    i.mv2_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.prq(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$72(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.xv2_1 = _this__u8e3s4;
    this.yv2_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.zv2_1 = this.yv2_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$o$collect$slambda_0(this.zv2_1, null);
            suspendResult = this.xv2_1.av3_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.jv3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).prq = function (it, $completion) {
    var tmp = this.qrq(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.prq(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.kv3_1;
          var canEditTeacherEnrolments = tmp0_container.y6();
          var canEditStudentEnrolments = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.jv3_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.sv3(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).qrq = function (it, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this.jv3_1, completion);
    i.kv3_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.prq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.bv4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).dv4 = function (it, $completion) {
    var tmp = this.ev4(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.dv4((!(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.bv4_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.sv3(this.cv4_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).ev4 = function (it, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this.bv4_1, completion);
    i.cv4_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.dv4(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.nv4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).uqh = function (canViewMembers, $completion) {
    var tmp = this.vqh(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.uqh((!(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.ov4_1) {
              tmp_1 = this.nv4_1.fqq().t7d().e93(this.nv4_1.rv5_1, this.nv4_1.qv5_1);
            } else {
              tmp_1 = flowOf(emptyList());
            }

            tmp_0.pv4_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda_0(this.nv4_1, null);
            suspendResult = this.pv4_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).vqh = function (canViewMembers, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this.nv4_1, completion);
    i.ov4_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.uqh(canViewMembers, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.av6_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).uqh = function (value, $completion) {
    var tmp = this.vqh(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.uqh((!(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.dv6_1 = this.av6_1;
            var tmp_1 = this;
            tmp_1.ev6_1 = this.bv6_1;
            if (this.ev6_1) {
              this.hd_1 = 3;
              suspendResult = this.dv6_1.t1d(this.ev6_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.cv6_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).vqh = function (value, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda(this.av6_1, completion);
    i.bv6_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.uqh(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$73(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.nv6_1 = _this__u8e3s4;
    this.ov6_1 = collector;
  }
  protoOf($collectCOROUTINE$73).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.pv6_1 = this.ov6_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.pv6_1, null);
            suspendResult = this.nv6_1.qv6_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.qv6_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_8).jqh = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$73(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.jqh(collector, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.zv6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).uqh = function (canViewMembers, $completion) {
    var tmp = this.vqh(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.uqh((!(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.av7_1) {
              this.hd_1 = 1;
              suspendResult = this.zv6_1.fqq().t7d().l93(this.zv6_1.rv5_1, this.zv6_1.qv5_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.zv6_1.eqy_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.sv3(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.zv6_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.vq8(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).vqh = function (canViewMembers, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this.zv6_1, completion);
    i.av7_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.uqh(canViewMembers, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.jv7_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.jv7_1.fqq().q7d().ee7(this.jv7_1.qv5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var terminology = suspendResult;
            l$ret$1: do {
              var this_0 = this.jv7_1.eqy_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.sv3(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.jv7_1, completion);
    i.kv7_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.tv7_1 = $permissionFlow;
    this.uv7_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.tv7_1);
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_0(this.uv7_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.tv7_1, this.uv7_1, completion);
    i.vv7_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.ev8_1 = $canViewMembersFlow;
    this.fv8_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.ev8_1);
            suspendResult = collectLatest(tmp_0, ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_2(this.fv8_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.ev8_1, this.fv8_1, completion);
    i.gv8_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.pv8_1 = $canViewMembersFlow;
    this.qv8_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.pv8_1);
            var tmp_0 = new _no_name_provided__qut3iv_8(this_0);
            suspendResult = collectLatest(tmp_0, ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_4(this.qv8_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.pv8_1, this.qv8_1, completion);
    i.rv8_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.av3_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_9).jqh = 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_9).a1c = function (collector, $completion) {
    return this.jqh(collector, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation) {
    this.av9_1 = $this_launch;
    this.bv9_1 = this$0;
    this.cv9_1 = $permissionFlow;
    this.dv9_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.av9_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_0(this.bv9_1, null));
          launch(this.av9_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_2(this.cv9_1, this.bv9_1, null));
          launch(this.av9_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_4(this.dv9_1, this.bv9_1, null));
          launch(this.av9_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_6(this.dv9_1, this.bv9_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.av9_1, this.bv9_1, this.cv9_1, this.dv9_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_140() {
    this.ev9_1 = 'CourseEnrolments';
  }
  var Companion_instance_189;
  function Companion_getInstance_157() {
    return Companion_instance_189;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_20(function_0) {
    this.fv9_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_20).t1d = function (value, $completion) {
    return this.fv9_1(value, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda(this$0, resultContinuation) {
    this.ov9_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.ov9_1.dqq().o7f();
            var tmp_2 = this.ov9_1.bqq();
            PermissionFlags_getInstance();
            var tmp_3 = new Long(16, 0);
            PermissionFlags_getInstance();
            var tmp_4 = new Long(8, 0);
            PermissionFlags_getInstance();
            tmp_0.qv9_1 = shareIn(tmp_1.idk(tmp_2, this.ov9_1.qv5_1, tmp_3, tmp_4, new Long(8192, 0)), this.ov9_1.aqq(), Companion_getInstance_12().v1h());
            var tmp_5 = this;
            var this_0 = this.qv9_1;
            tmp_5.rv9_1 = new _no_name_provided__qut3iv_9(this_0);
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.ov9_1.eqy_1, ClazzEnrolmentListViewModel$slambda$slambda_0(this.pv9_1, this.ov9_1, this.qv9_1, this.rv9_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.ov9_1, completion);
    i.pv9_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_117();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.qv5_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_117();
    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.rv5_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this.aqq();
    launch(tmp_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda_0(this, null));
  }
  protoOf(ClazzEnrolmentListViewModel).sv9 = function (enrolment) {
    var tmp = Companion_instance_35.n4r();
    Companion_getInstance_117();
    this.rqq('EnrolmentEdit', '', null, tmp, mapOf_0(to('entityUid', enrolment.b8i_1.toString())), VOID, true);
  };
  protoOf(ClazzEnrolmentListViewModel).tv9 = function () {
    Companion_getInstance_117();
    this.lqp_1.wp8('PersonDetailView', mapOf_0(to('entityUid', this.rv5_1.toString())));
  };
  protoOf(ClazzEnrolmentListViewModel).yqy = function (searchText) {
  };
  protoOf(ClazzEnrolmentListViewModel).zqy = 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.lv3_1 = enrolmentList;
    this.mv3_1 = personName;
    this.nv3_1 = courseName;
    this.ov3_1 = canEditTeacherEnrolments;
    this.pv3_1 = canEditStudentEnrolments;
    this.qv3_1 = courseTerminology;
    this.rv3_1 = timeZone;
  }
  protoOf(ClazzEnrolmentListUiState).uv9 = function (enrolment) {
    var tmp;
    var tmp_0 = enrolment.g8i_1;
    if (tmp_0 === 1001) {
      tmp = this.ov3_1;
    } else {
      tmp = this.ov3_1;
    }
    var tmp0_canEdit = tmp;
    var tmp1_timeZone = this.rv3_1;
    return new ClazzEnrolmentListItemUiState(tmp0_canEdit, enrolment, tmp1_timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).vv9 = function (enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) {
    return new ClazzEnrolmentListUiState(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).sv3 = function (enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone, $super) {
    enrolmentList = enrolmentList === VOID ? this.lv3_1 : enrolmentList;
    personName = personName === VOID ? this.mv3_1 : personName;
    courseName = courseName === VOID ? this.nv3_1 : courseName;
    canEditTeacherEnrolments = canEditTeacherEnrolments === VOID ? this.ov3_1 : canEditTeacherEnrolments;
    canEditStudentEnrolments = canEditStudentEnrolments === VOID ? this.pv3_1 : canEditStudentEnrolments;
    courseTerminology = courseTerminology === VOID ? this.qv3_1 : courseTerminology;
    timeZone = timeZone === VOID ? this.rv3_1 : timeZone;
    return $super === VOID ? this.vv9(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) : $super.vv9.call(this, enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).toString = function () {
    return 'ClazzEnrolmentListUiState(enrolmentList=' + this.lv3_1 + ', personName=' + this.mv3_1 + ', courseName=' + this.nv3_1 + ', canEditTeacherEnrolments=' + this.ov3_1 + ', canEditStudentEnrolments=' + this.pv3_1 + ', courseTerminology=' + this.qv3_1 + ', timeZone=' + this.rv3_1 + ')';
  };
  protoOf(ClazzEnrolmentListUiState).hashCode = function () {
    var result = hashCode(this.lv3_1);
    result = imul(result, 31) + (this.mv3_1 == null ? 0 : getStringHashCode(this.mv3_1)) | 0;
    result = imul(result, 31) + (this.nv3_1 == null ? 0 : getStringHashCode(this.nv3_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ov3_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pv3_1) | 0;
    result = imul(result, 31) + (this.qv3_1 == null ? 0 : hashCode(this.qv3_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.rv3_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.lv3_1, tmp0_other_with_cast.lv3_1))
      return false;
    if (!(this.mv3_1 == tmp0_other_with_cast.mv3_1))
      return false;
    if (!(this.nv3_1 == tmp0_other_with_cast.nv3_1))
      return false;
    if (!(this.ov3_1 === tmp0_other_with_cast.ov3_1))
      return false;
    if (!(this.pv3_1 === tmp0_other_with_cast.pv3_1))
      return false;
    if (!equals(this.qv3_1, tmp0_other_with_cast.qv3_1))
      return false;
    if (!(this.rv3_1 === tmp0_other_with_cast.rv3_1))
      return false;
    return true;
  };
  function ClazzEnrolmentListItemUiState(canEdit, enrolment, timeZone) {
    canEdit = canEdit === VOID ? false : canEdit;
    this.wv9_1 = canEdit;
    this.xv9_1 = enrolment;
    this.yv9_1 = timeZone;
  }
  protoOf(ClazzEnrolmentListItemUiState).toString = function () {
    return 'ClazzEnrolmentListItemUiState(canEdit=' + this.wv9_1 + ', enrolment=' + this.xv9_1 + ', timeZone=' + this.yv9_1 + ')';
  };
  protoOf(ClazzEnrolmentListItemUiState).hashCode = function () {
    var result = getBooleanHashCode(this.wv9_1);
    result = imul(result, 31) + hashCode(this.xv9_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.yv9_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.wv9_1 === tmp0_other_with_cast.wv9_1))
      return false;
    if (!equals(this.xv9_1, tmp0_other_with_cast.xv9_1))
      return false;
    if (!(this.yv9_1 === tmp0_other_with_cast.yv9_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().anb_1);
    RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance = new RecordAttendanceOption('RECORD_ATTENDANCE_NEW_SCHEDULE', 1, strings_getInstance().bnb_1);
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.hva_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).jva = function (clazz, $completion) {
    var tmp = this.kva(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.jva((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.hva_1.eqy_1;
          var tmp_0;
          var tmp_1 = this_0.t2().mva_1;
          var tmp0_safe_receiver = this.iva_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.iva_1;
                var tmp1_elvis_lhs = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.j8e_1;
                var nextValue = prevValue.tva(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.hva_1.nqp_1;
          var tmp_2;
          var tmp_3 = this_1.t2().iq8_1;
          var tmp0_safe_receiver_2 = this.iva_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.iva_1;
                var nextValue_0 = prevValue_0.vq8(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).kva = function (clazz, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this.hva_1, completion);
    i.iva_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.jva(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.eqy_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.tva(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.wvb(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).hvc = function (hasPermission, hasLogs, $completion) {
    var tmp = this.ivc(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.hvc(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.fvc_1, this.gvc_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).ivc = function (hasPermission, hasLogs, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.fvc_1 = hasPermission;
    i.gvc_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.hvc(hasPermission, hasLogs, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.rvc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).tvc = function (it, $completion) {
    var tmp = this.uvc(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.tvc(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.svc_1.vvc_1) {
            this_0.i1(RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance());
          }
          if (this.svc_1.vvc_1 ? this.svc_1.wvc_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.rvc_1.eqy_1;
            while (true) {
              var prevValue = this_1.t2();
              var nextValue = prevValue.tva(VOID, VOID, options);
              if (this_1.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.rvc_1.nqp_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var tmp_0 = !options.c1();
              var tmp_1 = this.rvc_1.jqq().vol(strings_getInstance().dmw_1);
              var tmp_2 = FabIcon_ADD_getInstance();
              var nextValue_0 = prevValue_0.vq8(new FabUiState(tmp_0, tmp_1, tmp_2, ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda$lambda(options, this.rvc_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).uvc = function (it, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this.rvc_1, completion);
    i.svc_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.tvc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.fvd_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.fvd_1.fqq().o7d().t8c(this.fvd_1.uvb_1);
            var tmp_1 = ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_0(this.fvd_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.fvd_1, completion);
    i.gvd_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.pvd_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.pvd_1.fqq().o7f();
            var tmp_2 = this.pvd_1.bqq();
            PermissionFlags_getInstance();
            tmp_0.rvd_1 = tmp_1.fdk(tmp_2, this.pvd_1.uvb_1, new Long(64, 0));
            var tmp_3 = this;
            var tmp_4 = this.pvd_1.fqq().m7e();
            tmp_3.svd_1 = tmp_4.ka3(this.pvd_1.uvb_1, 8);
            this.hd_1 = 1;
            var tmp_5 = combine(this.rvd_1, this.svd_1, ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_2(null));
            var tmp_6 = ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_4(this.pvd_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.pvd_1, completion);
    i.qvd_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.bve_1 = $this_launch;
    this.cve_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.bve_1, VOID, VOID, ClazzLogListAttendanceViewModel$slambda$slambda$slambda_0(this.cve_1, null));
          launch(this.bve_1, VOID, VOID, ClazzLogListAttendanceViewModel$slambda$slambda$slambda_2(this.cve_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.bve_1, this.cve_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.fve_1 = stringResource;
  }
  function PermissionAndExistingLogs(hasRecordPermission, hasExistingLogs) {
    this.vvc_1 = hasRecordPermission;
    this.wvc_1 = hasExistingLogs;
  }
  protoOf(PermissionAndExistingLogs).toString = function () {
    return 'PermissionAndExistingLogs(hasRecordPermission=' + this.vvc_1 + ', hasExistingLogs=' + this.wvc_1 + ')';
  };
  protoOf(PermissionAndExistingLogs).hashCode = function () {
    var result = getBooleanHashCode(this.vvc_1);
    result = imul(result, 31) + getBooleanHashCode(this.wvc_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.vvc_1 === tmp0_other_with_cast.vvc_1))
      return false;
    if (!(this.wvc_1 === tmp0_other_with_cast.wvc_1))
      return false;
    return true;
  };
  function Companion_141() {
    this.gve_1 = 'CourseLogListAttendanceView';
  }
  var Companion_instance_190;
  function Companion_getInstance_158() {
    return Companion_instance_190;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_21(function_0) {
    this.hve_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_21).t1d = function (value, $completion) {
    return this.hve_1(value, $completion);
  };
  function ClazzLogListAttendanceViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      var tmp = this$0.fqq().m7e();
      return tmp.ia3(this$0.uvb_1, 8);
    };
  }
  function ClazzLogListAttendanceViewModel$slambda(this$0, resultContinuation) {
    this.qve_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.qve_1.eqy_1, ClazzLogListAttendanceViewModel$slambda$slambda_0(this.rve_1, this.qve_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.qve_1, completion);
    i.rve_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.avf_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.avf_1.fqq().m7e().la3(this.avf_1.uvb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var mostRecentLogUid = suspendResult;
            var this_0 = this.avf_1.lqp_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_117();
              tmp0_safe_receiver.wp8('EditAttendance', mapOf_0(to('entityUid', mostRecentLogUid.toString())));
            }

            this.avf_1.cvf();
            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.avf_1, completion);
    i.bvf_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_117();
    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.uvb_1 = tmp_1;
    var tmp_2 = this;
    tmp_2.vvb_1 = ClazzLogListAttendanceViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.<anonymous>' call
        var nextValue = prevValue.tva(VOID, VOID, VOID, this.vvb_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.aqq();
    launch(tmp_3, VOID, VOID, ClazzLogListAttendanceViewModel$slambda_0(this, null));
  }
  protoOf(ClazzLogListAttendanceViewModel).cvf = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.onDismissCreateNewOptions.<anonymous>' call
        var nextValue = prevValue.tva(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzLogListAttendanceViewModel).yqy = function (searchText) {
  };
  protoOf(ClazzLogListAttendanceViewModel).zqy = function () {
  };
  protoOf(ClazzLogListAttendanceViewModel).wvb = function (option) {
    var tmp0 = option.za_1;
    if (tmp0 === 1) {
      Companion_getInstance_126();
      var tmp = to('timeZone', this.eqy_1.t2().mva_1);
      Companion_getInstance_117();
      this.rqz('ClazzLogEdit', mapOf([tmp, to('clazzUid', this.uvb_1.toString())]));
      this.cvf();
    } else if (tmp0 === 0) {
      if (this.mqq().equals(Companion_getInstance_98().cq9_1))
        return Unit_instance;
      this.lqq(Companion_getInstance_98().cq9_1);
      var tmp_0 = this.aqq();
      launch(tmp_0, VOID, VOID, ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda_0(this, null));
    }
  };
  protoOf(ClazzLogListAttendanceViewModel).dvf = function (clazzLog) {
    Companion_getInstance_117();
    var tmp = to('entityUid', clazzLog.ga4_1.toString());
    Companion_getInstance_126();
    this.lqp_1.wp8('EditAttendance', mapOf([tmp, to('clazzUid', this.uvb_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().emj().fmi() : 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().mmw_1, 7), new MessageIdOption2(strings_getInstance().mmy_1, 30), new MessageIdOption2(strings_getInstance().yn0_1, 90)]) : viewIdToNumDays;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? false : createNewOptionsVisible;
    this.lva_1 = graphData;
    this.mva_1 = timeZoneId;
    this.nva_1 = recordAttendanceOptions;
    this.ova_1 = clazzLogsList;
    this.pva_1 = fieldsEnabled;
    this.qva_1 = selectedChipId;
    this.rva_1 = viewIdToNumDays;
    this.sva_1 = createNewOptionsVisible;
  }
  protoOf(ClazzLogListAttendanceUiState).evf = function (graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) {
    return new ClazzLogListAttendanceUiState(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible);
  };
  protoOf(ClazzLogListAttendanceUiState).tva = function (graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible, $super) {
    graphData = graphData === VOID ? this.lva_1 : graphData;
    timeZoneId = timeZoneId === VOID ? this.mva_1 : timeZoneId;
    recordAttendanceOptions = recordAttendanceOptions === VOID ? this.nva_1 : recordAttendanceOptions;
    clazzLogsList = clazzLogsList === VOID ? this.ova_1 : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? this.pva_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.qva_1 : selectedChipId;
    viewIdToNumDays = viewIdToNumDays === VOID ? this.rva_1 : viewIdToNumDays;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? this.sva_1 : createNewOptionsVisible;
    return $super === VOID ? this.evf(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) : $super.evf.call(this, graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible);
  };
  protoOf(ClazzLogListAttendanceUiState).toString = function () {
    return 'ClazzLogListAttendanceUiState(graphData=' + this.lva_1 + ', timeZoneId=' + this.mva_1 + ', recordAttendanceOptions=' + this.nva_1 + ', clazzLogsList=' + this.ova_1 + ', fieldsEnabled=' + this.pva_1 + ', selectedChipId=' + this.qva_1 + ', viewIdToNumDays=' + this.rva_1 + ', createNewOptionsVisible=' + this.sva_1 + ')';
  };
  protoOf(ClazzLogListAttendanceUiState).hashCode = function () {
    var result = this.lva_1 == null ? 0 : this.lva_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.mva_1) | 0;
    result = imul(result, 31) + hashCode(this.nva_1) | 0;
    result = imul(result, 31) + hashCode(this.ova_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pva_1) | 0;
    result = imul(result, 31) + this.qva_1 | 0;
    result = imul(result, 31) + hashCode(this.rva_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.sva_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.lva_1, tmp0_other_with_cast.lva_1))
      return false;
    if (!(this.mva_1 === tmp0_other_with_cast.mva_1))
      return false;
    if (!equals(this.nva_1, tmp0_other_with_cast.nva_1))
      return false;
    if (!equals(this.ova_1, tmp0_other_with_cast.ova_1))
      return false;
    if (!(this.pva_1 === tmp0_other_with_cast.pva_1))
      return false;
    if (!(this.qva_1 === tmp0_other_with_cast.qva_1))
      return false;
    if (!equals(this.rva_1, tmp0_other_with_cast.rva_1))
      return false;
    if (!(this.sva_1 === tmp0_other_with_cast.sva_1))
      return false;
    return true;
  };
  function ClazzLogEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda$slambda).ovf = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.ovf(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).jo1 = function (it, completion) {
    var i = new ClazzLogEditViewModel$slambda$slambda(completion);
    i.nvf_1 = it;
    return i;
  };
  function ClazzLogEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.ovf(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.xvf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).yvf = 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.yvf($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.xvf_1.zvg_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.xvf_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.yvf($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.xvg_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.evh(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzLogEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_142() {
    this.fvh_1 = 'ClazzLogEdit';
  }
  var Companion_instance_191;
  function Companion_getInstance_159() {
    return Companion_instance_191;
  }
  function ClazzLogEditViewModel$slambda(this$0, resultContinuation) {
    this.ovh_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.ovh_1, null);
            suspendResult = this.ovh_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzLogEditViewModel$slambda$lambda(this.ovh_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.ovh_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.ovh_1.jqq().vol(strings_getInstance().cml_1);
                var nextValue = prevValue.vq8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, ClazzLogEditViewModel$onClickSave$ref(this.ovh_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.ovh_1.xvg_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.evh(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.ovh_1, completion);
    i.pvh_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.yvh_1 = $commitDelay;
    this.zvh_1 = $entity;
    this.avi_1 = $this;
    this.bvi_1 = $key;
    this.cvi_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.yvh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.zvh_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.avi_1.pqq(this.avi_1.jqp_1, this.bvi_1, this.cvi_1, this.zvh_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.yvh_1, this.zvh_1, this.avi_1, this.bvi_1, this.cvi_1, completion);
    i.dvi_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_126();
    var tmp0_elvis_lhs = savedStateHandle.ba('timeZone');
    tmp.wvg_1 = tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs;
    this.xvg_1 = MutableStateFlow(new ClazzLogEditUiState(VOID, VOID, this.wvg_1));
    this.yvg_1 = asStateFlow(this.xvg_1);
    var tmp_0 = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.zvg_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.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, this.jqq().vol(strings_getInstance().bnb_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = this.aqq();
    launch(tmp_1, VOID, VOID, ClazzLogEditViewModel$slambda_0(this, null));
  }
  protoOf(ClazzLogEditViewModel).evi = function (clazzLog) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.xvg_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.bvh_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ia4_1;
        var nextValue = prevValue.evh(VOID, clazzLog, VOID, this.uqw(tmp, clazzLog == null ? null : clazzLog.ia4_1, prevValue.dvh_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_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.aqq();
    tmp_0.qqv_1 = launch(tmp_1, VOID, VOID, ClazzLogEditViewModel$onEntityChanged$slambda_0(commitDelay, clazzLog, this, key, serializer, null));
  };
  protoOf(ClazzLogEditViewModel).vsd = function () {
    var tmp0_elvis_lhs = this.xvg_1.t2().bvh_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().cmp_1 : clazzLog.ia4_1.c7(systemTimeInMillis()) > 0 ? strings_getInstance().dno_1 : null;
    if (!(errorMsg == null)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.xvg_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.evh(VOID, VOID, VOID, this.jqq().vol(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_126();
    this.lqp_1.wp8('EditAttendance', mapOf([tmp_0, to('clazzUid', this.zvg_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.avh_1 = fieldsEnabled;
    this.bvh_1 = clazzLog;
    this.cvh_1 = timeZone;
    this.dvh_1 = dateError;
  }
  protoOf(ClazzLogEditUiState).fvi = function (fieldsEnabled, clazzLog, timeZone, dateError) {
    return new ClazzLogEditUiState(fieldsEnabled, clazzLog, timeZone, dateError);
  };
  protoOf(ClazzLogEditUiState).evh = function (fieldsEnabled, clazzLog, timeZone, dateError, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.avh_1 : fieldsEnabled;
    clazzLog = clazzLog === VOID ? this.bvh_1 : clazzLog;
    timeZone = timeZone === VOID ? this.cvh_1 : timeZone;
    dateError = dateError === VOID ? this.dvh_1 : dateError;
    return $super === VOID ? this.fvi(fieldsEnabled, clazzLog, timeZone, dateError) : $super.fvi.call(this, fieldsEnabled, clazzLog, timeZone, dateError);
  };
  protoOf(ClazzLogEditUiState).toString = function () {
    return 'ClazzLogEditUiState(fieldsEnabled=' + this.avh_1 + ', clazzLog=' + this.bvh_1 + ', timeZone=' + this.cvh_1 + ', dateError=' + this.dvh_1 + ')';
  };
  protoOf(ClazzLogEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.avh_1);
    result = imul(result, 31) + (this.bvh_1 == null ? 0 : this.bvh_1.hashCode()) | 0;
    result = imul(result, 31) + getStringHashCode(this.cvh_1) | 0;
    result = imul(result, 31) + (this.dvh_1 == null ? 0 : getStringHashCode(this.dvh_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.avh_1 === tmp0_other_with_cast.avh_1))
      return false;
    if (!equals(this.bvh_1, tmp0_other_with_cast.bvh_1))
      return false;
    if (!(this.cvh_1 === tmp0_other_with_cast.cvh_1))
      return false;
    if (!(this.dvh_1 == tmp0_other_with_cast.dvh_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.ovi_1 = this$0;
    this.pvi_1 = $newClazzLogVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).rvi = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.rvi(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.qvi_1.m7e();
            suspendResult = tmp_0.ja3(this.ovi_1.uvj_1, 8, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var dbLogList = suspendResult;
            var tmp_1;
            if (!(this.pvi_1 == null)) {
              var this_0 = plus(dbLogList, listOf_0(this.pvi_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).jo1 = function (db, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda(this.ovi_1, this.pvi_1, completion);
    i.qvi_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.rvi(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).dvk = 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.dvk($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.dvk($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.pvj_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.kvk(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.tvk_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.tvk_1.fqq().o7d().c8d(this.tvk_1.pvj_1.t2().vvk().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.tvk_1.pvj_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.kvk(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.tvk_1, completion);
    i.uvk_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.vsd();
      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.evl_1 = this$0;
    this.fvl_1 = $clazzLogsToSave;
    this.gvl_1 = $attendanceRecordsToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(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.io1(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.evl_1.fqq().m7e().ma3(this.fvl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.evl_1.fqq().l7e().g9y(this.gvl_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).jo1 = function (it, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this.evl_1, this.fvl_1, this.gvl_1, completion);
    i.hvl_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_newClazzLog__zdra0r($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rvj_1;
    newClazzLog$factory();
    return this_0.t2();
  }
  function _set_currentClazzLogIndex__l00dbq($this, value) {
    $this.jqp_1.mql('activeIndex', toString_0(value));
  }
  function _get_currentClazzLogIndex__yy31c2($this) {
    var tmp0_safe_receiver = $this.jqp_1.ba('activeIndex');
    return tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
  }
  function savePersonAndAttendanceRecords($this, clazzLogUid, records, $completion) {
    var tmp = new $savePersonAndAttendanceRecordsCOROUTINE$74($this, clazzLogUid, records, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function commitAttendanceRecordsToState($this, $completion) {
    var tmp = new $commitAttendanceRecordsToStateCOROUTINE$75($this, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_143() {
    this.kvm_1 = 'newclazzlog';
    this.lvm_1 = 'EditAttendance';
    this.mvm_1 = 'activeIndex';
    this.nvm_1 = 'log_';
    this.ovm_1 = 'logsToSave';
  }
  var Companion_instance_192;
  function Companion_getInstance_160() {
    return Companion_instance_192;
  }
  function sam$kotlin_Comparator$0_2(function_0) {
    this.pvm_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_2).pa = function (a, b) {
    return this.pvm_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.yvm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda).hsg = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).he = function (p1, $completion) {
    return this.hsg(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.zvm_1.o7f();
            var tmp_1 = this.yvm_1.bqq();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.jdk(tmp_1, this.yvm_1.uvj_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).jo1 = function (db, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda(this.yvm_1, completion);
    i.zvm_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.hsg(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda_1(this$0, resultContinuation) {
    this.ivn_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.kvn_1 = _get_newClazzLog__zdra0r(this.ivn_1);
            this.hd_1 = 1;
            var tmp_0 = this.ivn_1.dqq().o7f();
            var tmp_1 = this.ivn_1.bqq();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.jdk(tmp_1, this.ivn_1.uvj_1, new Long(64, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            launch(this.jvn_1, VOID, VOID, ClazzLogEditAttendanceViewModel$slambda$slambda_4(this.ivn_1, null));
            var currentClazzLogIndexVal = _get_currentClazzLogIndex__yy31c2(this.ivn_1);
            var tmp_5;
            if (!(currentClazzLogIndexVal == null)) {
              tmp_5 = currentClazzLogIndexVal;
            } else if (!(this.kvn_1 == null)) {
              var tmp0_elvis_lhs = this.ivn_1.pvj_1.t2().mvn(this.kvn_1.ga4_1);
              tmp_5 = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
            } else if (!this.ivn_1.rqv_1.equals(new Long(0, 0))) {
              var tmp1_elvis_lhs = this.ivn_1.pvj_1.t2().mvn(this.ivn_1.rqv_1);
              tmp_5 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
            } else {
              tmp_5 = this.ivn_1.pvj_1.t2().gvk_1.u() - 1 | 0;
            }

            var startIndex = tmp_5;
            this.ivn_1.nvn(this.ivn_1.pvj_1.t2().gvk_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.ivn_1, completion);
    i.jvn_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.wvn_1 = $clazzLog;
    this.xvn_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.zvn_1 = 'log_' + this.wvn_1.ga4_1.toString();
            this.hd_1 = 1;
            suspendResult = this.xvn_1.oqq(this.xvn_1.jqp_1, this.zvn_1, ListSerializer(Companion_instance_38.n4r()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.avo_1 = suspendResult;
            if (this.avo_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.xvn_1.fqq().l7e().f9y(this.wvn_1.ha4_1, this.wvn_1.ga4_1, this.wvn_1.ia4_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.bvo_1 = this.avo_1;
              this.hd_1 = 8;
              continue $sm;
            }

          case 2:
            this.cvo_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.dvo_1 = this.cvo_1;
            var tmp_1 = this;
            tmp_1.evo_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.cvo_1, 10));
            this.fvo_1 = this.dvo_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.fvo_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.gvo_1 = this.fvo_1.e();
            var tmp_2 = this;
            tmp_2.hvo_1 = this.gvo_1;
            if (this.hvo_1.x9z_1 == null) {
              this.jvo_1 = this.hvo_1.v9z_1;
              var tmp_3 = this;
              tmp_3.kvo_1 = new ClazzLogAttendanceRecord();
              var tmp_4 = this;
              tmp_4.lvo_1 = this.kvo_1;
              this.hd_1 = 4;
              var tmp_5 = get_doorPrimaryKeyManager(this.xvn_1.dqq());
              suspendResult = tmp_5.o62(15, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_6 = this;
              tmp_6.ivo_1 = this.hvo_1;
              this.hd_1 = 5;
              continue $sm;
            }

          case 4:
            this.mvo_1 = suspendResult;
            this.lvo_1.a9z_1 = this.mvo_1;
            var tmp_7 = this.lvo_1;
            var tmp0_safe_receiver = this.hvo_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.lvo_1.b9z_1 = this.wvn_1.ga4_1;
            this.nvo_1 = this.kvo_1;
            this.ovo_1 = this.hvo_1.w9z_1;
            this.ivo_1 = new PersonAndClazzLogAttendanceRecord(this.jvo_1, this.ovo_1, this.nvo_1);
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.pvo_1 = this.ivo_1;
            this.evo_1.i1(this.pvo_1);
            this.hd_1 = 3;
            continue $sm;
          case 6:
            this.qvo_1 = this.evo_1;
            var tmp_8 = this;
            tmp_8.rvo_1 = this.qvo_1;
            this.hd_1 = 7;
            suspendResult = savePersonAndAttendanceRecords(this.xvn_1, this.wvn_1.ga4_1, this.rvo_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.bvo_1 = this.qvo_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var personAndAttendanceRecords = this.bvo_1;
            l$ret$1: do {
              var this_0 = this.xvn_1.pvj_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.kvk(personAndAttendanceRecords, VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.xvn_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_9;
                if (!prevValue_0.oq8_1.rq7_1) {
                  var tmp_10 = this.xvn_1.pvj_1.t2().ivk_1;
                  var tmp_11 = this.xvn_1.jqq().vol(strings_getInstance().on4_1);
                  tmp_9 = prevValue_0.vq8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(tmp_10, tmp_11, VOID, ClazzLogEditAttendanceViewModel$onClickSave$ref(this.xvn_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.wvn_1, this.xvn_1, completion);
    i.yvn_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.avp_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.avp_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.avp_1, completion);
    i.bvp_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.kvp_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.kvp_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.kvp_1, completion);
    i.lvp_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.uvp_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.wvp_1 = this.uvp_1.tvj_1;
            var tmp_1 = this;
            tmp_1.xvp_1 = null;
            this.hd_1 = 2;
            suspendResult = this.wvp_1.a24(this.xvp_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.zvp_1 = ArrayList_init_$Create$();
            var tmp_3 = this;
            tmp_3.avq_1 = ArrayList_init_$Create$();
            this.hd_1 = 4;
            suspendResult = this.uvp_1.oqq(this.uvp_1.jqp_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.bvq_1 = suspendResult;
            this.cvq_1 = this.bvq_1 == null ? emptyList() : this.bvq_1;
            var tmp_4 = this;
            tmp_4.dvq_1 = this.cvq_1;
            this.evq_1 = this.dvq_1.w();
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (!this.evq_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.fvq_1 = this.evq_1.e();
            var tmp_5 = this;
            tmp_5.gvq_1 = this.fvq_1;
            var tmp_6 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.uvp_1.pvj_1.t2().gvk_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.ga4_1.equals(this.gvq_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.hvq_1 = tmp$ret$0;
            this.hd_1 = 6;
            suspendResult = this.uvp_1.oqq(this.uvp_1.jqp_1, 'log_' + this.gvq_1.toString(), ListSerializer(Companion_instance_38.n4r()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.ivq_1 = suspendResult;
            var tmp_7 = this;
            var tmp_8;
            if (this.ivq_1 == null) {
              tmp_8 = null;
            } else {
              var this_0 = this.ivq_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.jvq_1 = tmp_8;
            this.kvq_1 = this.jvq_1 == null ? emptyList() : this.jvq_1;
            var this_1 = this.zvp_1;
            var element_1 = shallowCopy_6(this.hvq_1, ClazzLogEditAttendanceViewModel$onClickSave$slambda$lambda(this.kvq_1));
            this_1.i1(element_1);
            var this_2 = this.avq_1;
            var elements = this.kvq_1;
            addAll(this_2, elements);
            this.hd_1 = 5;
            continue $sm;
          case 7:
            this.hd_1 = 8;
            var tmp_9 = this.uvp_1.fqq();
            suspendResult = withDoorTransactionAsync(tmp_9, VOID, ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda_0(this.uvp_1, this.zvp_1, this.avq_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            this.yvp_1 = suspendResult;
            this.id_1 = 11;
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.id_1 = 11;
            this.wvp_1.l23(this.xvp_1);
            if (!(_get_newClazzLog__zdra0r(this.uvp_1) == null)) {
              this.uvp_1.lqp_1.vqb('ClazzLogEdit', true);
            } else {
              this.uvp_1.uqv(this.uvp_1.pvj_1.t2().vvk());
            }

            return Unit_instance;
          case 10:
            this.id_1 = 11;
            var t = this.kd_1;
            this.wvp_1.l23(this.xvp_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.uvp_1, completion);
    i.vvp_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$74(_this__u8e3s4, clazzLogUid, records, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.qvl_1 = _this__u8e3s4;
    this.rvl_1 = clazzLogUid;
    this.svl_1 = records;
  }
  protoOf($savePersonAndAttendanceRecordsCOROUTINE$74).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.tvl_1 = 'log_' + this.rvl_1.toString();
            this.hd_1 = 1;
            suspendResult = this.qvl_1.pqq(this.qvl_1.jqp_1, this.tvl_1, ListSerializer(Companion_instance_38.n4r()), this.svl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            this.uvl_1 = suspendResult;
            this.vvl_1 = this.uvl_1 == null ? null : toSet(this.uvl_1);
            this.wvl_1 = this.vvl_1 == null ? emptySet() : this.vvl_1;
            if (!this.wvl_1.a1(this.rvl_1)) {
              this.xvl_1 = plus_2(this.wvl_1, this.rvl_1);
              this.hd_1 = 3;
              suspendResult = this.qvl_1.pqq(this.qvl_1.jqp_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), toList(this.xvl_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$75(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.gvm_1 = _this__u8e3s4;
  }
  protoOf($commitAttendanceRecordsToStateCOROUTINE$75).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.hvm_1 = this.gvm_1.tvj_1;
            var tmp_1 = this;
            tmp_1.ivm_1 = null;
            this.hd_1 = 1;
            suspendResult = this.hvm_1.a24(this.ivm_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.gvm_1, this.gvm_1.pvj_1.t2().vvk().ga4_1, this.gvm_1.pvj_1.t2().evk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.jvm_1 = suspendResult;
            this.id_1 = 6;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.id_1 = 6;
            this.hvm_1.l23(this.ivm_1);
            return Unit_instance;
          case 5:
            this.id_1 = 6;
            var t = this.kd_1;
            this.hvm_1.l23(this.ivm_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.pvj_1 = MutableStateFlow(new ClazzLogEditAttendanceUiState());
    this.qvj_1 = asStateFlow(this.pvj_1);
    var tmp = this;
    tmp.rvj_1 = lazy_0(ClazzLogEditAttendanceViewModel$newClazzLog$delegate$lambda(savedStateHandle, this));
    this.svj_1 = null;
    this.tvj_1 = Mutex();
    var tmp_0 = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.uvj_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.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, this.jqq().vol(strings_getInstance().dmw_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = ClazzLogEditAttendanceViewModel$slambda_0(this, null);
    this.vqq(tmp_1, VOID, VOID, ClazzLogEditAttendanceViewModel$slambda_2(this, null));
  }
  protoOf(ClazzLogEditAttendanceViewModel).nvn = function (clazzLog, forceLoad) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = this.pvj_1.t2().gvk_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.pvj_1.t2().fvk_1 : false)
      return Unit_instance;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pvj_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.gvk_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.kvk(VOID, tmp$ret$3, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block_1;
        }
      }
    }
    var tmp0_safe_receiver = this.svj_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.aqq();
    tmp.svj_1 = launch(tmp_0, VOID, VOID, ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda_0(clazzLog, this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).lvq = function (clazzLog, forceLoad, $super) {
    forceLoad = forceLoad === VOID ? false : forceLoad;
    var tmp;
    if ($super === VOID) {
      this.nvn(clazzLog, forceLoad);
      tmp = Unit_instance;
    } else {
      tmp = $super.nvn.call(this, clazzLog, forceLoad);
    }
    return tmp;
  };
  protoOf(ClazzLogEditAttendanceViewModel).mvq = function (record) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pvj_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClazzLogAttendanceChanged.<anonymous>' call
        var nextValue = prevValue.kvk(replace_0(prevValue.evk_1, record, ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$lambda(record)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda_0(this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).nvq = function (status) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pvj_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.evk_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.gkb(VOID, VOID, tmp);
          destination.i1(tmp$ret$0);
        }
        var nextValue = prevValue.kvk(destination);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.aqq();
    launch(tmp_0, VOID, VOID, ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda_0(this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).vsd = function () {
    var tmp = this.aqq();
    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.evk_1 = clazzLogAttendanceRecordList;
    this.fvk_1 = currentClazzLogIndex;
    this.gvk_1 = clazzLogsList;
    this.hvk_1 = fieldsEnabled;
    this.ivk_1 = canEdit;
    this.jvk_1 = timeZone;
  }
  protoOf(ClazzLogEditAttendanceUiState).mvn = 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.gvk_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).vvk = function () {
    return this.gvk_1.v(this.fvk_1);
  };
  protoOf(ClazzLogEditAttendanceUiState).ovq = function (clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) {
    return new ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone);
  };
  protoOf(ClazzLogEditAttendanceUiState).kvk = function (clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone, $super) {
    clazzLogAttendanceRecordList = clazzLogAttendanceRecordList === VOID ? this.evk_1 : clazzLogAttendanceRecordList;
    currentClazzLogIndex = currentClazzLogIndex === VOID ? this.fvk_1 : currentClazzLogIndex;
    clazzLogsList = clazzLogsList === VOID ? this.gvk_1 : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? this.hvk_1 : fieldsEnabled;
    canEdit = canEdit === VOID ? this.ivk_1 : canEdit;
    timeZone = timeZone === VOID ? this.jvk_1 : timeZone;
    return $super === VOID ? this.ovq(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) : $super.ovq.call(this, clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone);
  };
  protoOf(ClazzLogEditAttendanceUiState).toString = function () {
    return 'ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList=' + this.evk_1 + ', currentClazzLogIndex=' + this.fvk_1 + ', clazzLogsList=' + this.gvk_1 + ', fieldsEnabled=' + this.hvk_1 + ', canEdit=' + this.ivk_1 + ', timeZone=' + this.jvk_1 + ')';
  };
  protoOf(ClazzLogEditAttendanceUiState).hashCode = function () {
    var result = hashCode(this.evk_1);
    result = imul(result, 31) + this.fvk_1 | 0;
    result = imul(result, 31) + hashCode(this.gvk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hvk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ivk_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.jvk_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.evk_1, tmp0_other_with_cast.evk_1))
      return false;
    if (!(this.fvk_1 === tmp0_other_with_cast.fvk_1))
      return false;
    if (!equals(this.gvk_1, tmp0_other_with_cast.gvk_1))
      return false;
    if (!(this.hvk_1 === tmp0_other_with_cast.hvk_1))
      return false;
    if (!(this.ivk_1 === tmp0_other_with_cast.ivk_1))
      return false;
    if (!(this.jvk_1 === tmp0_other_with_cast.jvk_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().hnq_1;
        break;
      case 4:
        tmp = strings_getInstance().inq_1;
        break;
      case 3:
        tmp = strings_getInstance().jnq_1;
        break;
      case 2:
        tmp = strings_getInstance().knq_1;
        break;
      case 1:
        tmp = strings_getInstance().lnq_1;
        break;
      case 0:
        tmp = strings_getInstance().mnq_1;
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  }
  function get_contentTypeStringResource(_this__u8e3s4) {
    var tmp;
    if (!_this__u8e3s4.caw_1) {
      tmp = strings_getInstance().one_1;
    } else {
      var tmp0_subject = _this__u8e3s4.haw_1;
      var tmp_0;
      if (tmp0_subject === 1) {
        tmp_0 = strings_getInstance().imo_1;
      } else {
        if (tmp0_subject === 2) {
          tmp_0 = strings_getInstance().gmo_1;
        } else {
          if (tmp0_subject === 3) {
            tmp_0 = strings_getInstance().hmo_1;
          } else {
            if (tmp0_subject === 4) {
              tmp_0 = strings_getInstance().tnb_1;
            } else {
              if (tmp0_subject === 5) {
                tmp_0 = strings_getInstance().lmo_1;
              } else {
                if (tmp0_subject === 6) {
                  tmp_0 = strings_getInstance().jmo_1;
                } else {
                  if (tmp0_subject === 7) {
                    tmp_0 = strings_getInstance().kmo_1;
                  } else {
                    tmp_0 = strings_getInstance().omj_1;
                  }
                }
              }
            }
          }
        }
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function Companion_144() {
    Companion_instance_193 = this;
    this.pvq_1 = 'ContentEntry';
    var tmp = this;
    Companion_getInstance_126();
    Companion_getInstance_126();
    Companion_getInstance_126();
    Companion_getInstance_126();
    tmp.qvq_1 = listOf(['entityUid', 'clazzUid', 'parentUid', 'courseBlockUid']);
  }
  var Companion_instance_193;
  function Companion_getInstance_161() {
    if (Companion_instance_193 == null)
      new Companion_144();
    return Companion_instance_193;
  }
  function ContentEntryDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_161();
    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.xqq(this_0, Companion_getInstance_161().qvq_1);
    var tmp$ret$2 = this_0.f3();
    var tmp_0 = new TabItem('ContentEntryDetailOverviewView', tmp$ret$2, this.jqq().vol(strings_getInstance().in6_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.xqq(this_1, Companion_getInstance_161().qvq_1);
    var tmp$ret$5 = this_1.f3();
    tmp.nvr_1 = MutableStateFlow(new ContentEntryDetailUiState(listOf([tmp_0, new TabItem('ContentEntryDetailAttemptsPersonList', tmp$ret$5, this.jqq().vol(strings_getInstance().smo_1))])));
    this.ovr_1 = asStateFlow(this.nvr_1);
  }
  function ContentEntryDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.pvr_1 = tabs;
  }
  protoOf(ContentEntryDetailUiState).toString = function () {
    return 'ContentEntryDetailUiState(tabs=' + this.pvr_1 + ')';
  };
  protoOf(ContentEntryDetailUiState).hashCode = function () {
    return hashCode(this.pvr_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.pvr_1, tmp0_other_with_cast.pvr_1))
      return false;
    return true;
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.yvr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).avs = function (contentEntry, $completion) {
    var tmp = this.bvs(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.avs((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.yvr_1.nqp_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.zvr_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.oav_1;
              var nextValue = prevValue.vq8(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).bvs = function (contentEntry, completion) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda(this.yvr_1, completion);
    i.zvr_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.avs(contentEntry, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.kvs_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.kvs_1.fqq().v7d().yau(this.kvs_1.lvt_1);
            var tmp_1 = ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda_0(this.kvs_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.kvs_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$76($this, db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_145() {
    this.xvt_1 = 'ContentEntryDetailAttemptsPersonList';
  }
  var Companion_instance_194;
  function Companion_getInstance_162() {
    return Companion_instance_194;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_22(function_0) {
    this.yvt_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_22).t1d = function (value, $completion) {
    return this.yvt_1(value, $completion);
  };
  function ContentEntryDetailAttemptsPersonListViewModel$attemptsPersonListPagingSource$lambda(this$0) {
    return function () {
      return this$0.fqq().j7e().ujf(this$0.lvt_1, this$0.bqq(), toQueryLikeParam(this$0.nqp_1.t2().nq8_1.cq8_1), this$0.eqy_1.t2().bvu_1.cqf_1);
    };
  }
  function ContentEntryDetailAttemptsPersonListViewModel$slambda(this$0, resultContinuation) {
    this.lvu_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.nvu_1 = filterNotNull(listOf([this.lvu_1.dqq(), this.lvu_1.eqq()]));
            this.ovu_1 = this.nvu_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.ovu_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.pvu_1 = this.ovu_1.e();
            var tmp_1 = this;
            tmp_1.qvu_1 = this.pvu_1;
            this.hd_1 = 2;
            suspendResult = buildSortOptions(this.lvu_1, this.qvu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var sortOptions = suspendResult;
            l$ret$1: do {
              var this_0 = this.lvu_1.eqy_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.rvu(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.lvu_1, completion);
    i.mvu_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.avv_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.avv_1.eqy_1, ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda_0(this.avv_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.avv_1, completion);
    i.bvv_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$76(_this__u8e3s4, db, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.vvt_1 = _this__u8e3s4;
    this.wvt_1 = db;
  }
  protoOf($buildSortOptionsCOROUTINE$76).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.wvt_1.j7e().yjf(this.vvt_1.lvt_1, this.vvt_1.bqq(), 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.cjh_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.njg_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().jml_1;
            var tmp_4 = new SortOrderOption(tmp_3, 1, true);
            var tmp_5 = strings_getInstance().jml_1;
            var tmp_6 = new SortOrderOption(tmp_5, 2, false);
            var tmp_7 = strings_getInstance().iml_1;
            var tmp_8 = new SortOrderOption(tmp_7, 3, true);
            var tmp_9 = strings_getInstance().iml_1;
            this_0.m1(listOf([tmp_4, tmp_6, tmp_8, new SortOrderOption(tmp_9, 4, false)]));
            if (hasScoreData) {
              var tmp_10 = strings_getInstance().lml_1;
              var tmp_11 = new SortOrderOption(tmp_10, 5, true);
              var tmp_12 = strings_getInstance().lml_1;
              this_0.m1(listOf([tmp_11, new SortOrderOption(tmp_12, 6, false)]));
            }

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

            var tmp_16 = strings_getInstance().qnm_1;
            var tmp_17 = new SortOrderOption(tmp_16, 10, null);
            var tmp_18 = strings_getInstance().kml_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_117();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.lvt_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    tmp_0.mvt_1 = ContentEntryDetailAttemptsPersonListViewModel$attemptsPersonListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsPersonListViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.nqz());
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqy_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.rvu(this.mvt_1);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_1 = this.aqq();
    launch(tmp_1, VOID, VOID, ContentEntryDetailAttemptsPersonListViewModel$slambda_0(this, null));
    var tmp_2 = this.aqq();
    launch(tmp_2, VOID, VOID, ContentEntryDetailAttemptsPersonListViewModel$slambda_2(this, null));
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).cvv = function (entry) {
    Companion_getInstance_117();
    var tmp = to('personUid', entry.xjh_1.f96_1.toString());
    Companion_getInstance_117();
    this.lqp_1.wp8('ContentEntryDetailAttemptsSessionList', mapOf([tmp, to('entryid', this.lvt_1.toString())]));
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).yqy = function (searchText) {
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).zqy = function () {
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).it3 = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsPersonListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.rvu(VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.gqy_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().qnm_1;
      var tmp_2 = new SortOrderOption(tmp_1, 10, null);
      var tmp_3 = strings_getInstance().kml_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.zvt_1 = attemptsPersonList;
    this.avu_1 = sortOptions;
    this.bvu_1 = sortOption;
    this.cvu_1 = showSortOptions;
  }
  protoOf(ContentEntryDetailAttemptsPersonListUiState).dvv = function (attemptsPersonList, sortOptions, sortOption, showSortOptions) {
    return new ContentEntryDetailAttemptsPersonListUiState(attemptsPersonList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).rvu = function (attemptsPersonList, sortOptions, sortOption, showSortOptions, $super) {
    attemptsPersonList = attemptsPersonList === VOID ? this.zvt_1 : attemptsPersonList;
    sortOptions = sortOptions === VOID ? this.avu_1 : sortOptions;
    sortOption = sortOption === VOID ? this.bvu_1 : sortOption;
    showSortOptions = showSortOptions === VOID ? this.cvu_1 : showSortOptions;
    return $super === VOID ? this.dvv(attemptsPersonList, sortOptions, sortOption, showSortOptions) : $super.dvv.call(this, attemptsPersonList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).toString = function () {
    return 'ContentEntryDetailAttemptsPersonListUiState(attemptsPersonList=' + this.zvt_1 + ', sortOptions=' + this.avu_1 + ', sortOption=' + this.bvu_1 + ', showSortOptions=' + this.cvu_1 + ')';
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).hashCode = function () {
    var result = hashCode(this.zvt_1);
    result = imul(result, 31) + hashCode(this.avu_1) | 0;
    result = imul(result, 31) + this.bvu_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cvu_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.zvt_1, tmp0_other_with_cast.zvt_1))
      return false;
    if (!equals(this.avu_1, tmp0_other_with_cast.avu_1))
      return false;
    if (!this.bvu_1.equals(tmp0_other_with_cast.bvu_1))
      return false;
    if (!(this.cvu_1 === tmp0_other_with_cast.cvu_1))
      return false;
    return true;
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.mvv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).ovv = 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.ovv((!(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.mvv_1.fqq().n7d().qg4(this.mvv_1.qvw_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.mvv_1, completion);
    i.nvv_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.ovv($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.avx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).cvx = 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.cvx((!(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.avx_1.fqq().v7d().yau(this.avx_1.pvw_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.avx_1, completion);
    i.bvx_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.cvx($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_146() {
    this.dvx_1 = 'ContentEntryDetailAttemptsSessionList';
  }
  var Companion_instance_195;
  function Companion_getInstance_163() {
    return Companion_instance_195;
  }
  function ContentEntryDetailAttemptsSessionListViewModel$attemptsSessionListPagingSource$lambda(this$0) {
    return function () {
      return this$0.fqq().j7e().vjf(this$0.pvw_1, this$0.qvw_1, this$0.bqq(), this$0.eqy_1.t2().gvx_1.cqf_1);
    };
  }
  function ContentEntryDetailAttemptsSessionListViewModel$slambda(this$0, resultContinuation) {
    this.qvx_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.svx_1 = async(this.rvx_1, VOID, VOID, ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_0(this.qvx_1, null));
            var tmp_1 = this;
            tmp_1.tvx_1 = async(this.rvx_1, VOID, VOID, ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_2(this.qvx_1, null));
            this.hd_1 = 1;
            suspendResult = this.svx_1.nv(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            var contentEntry = suspendResult;
            var tmp0_safe_receiver = this.uvx_1;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zg8_1;
            var tmp1_safe_receiver = this.uvx_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.qvx_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.vq8(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.qvx_1, completion);
    i.rvx_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_117();
    var tmp0_safe_receiver = savedStateHandle.ba('entryid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.pvw_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_117();
    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.qvw_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    tmp_1.rvw_1 = ContentEntryDetailAttemptsSessionListViewModel$attemptsSessionListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsSessionListViewModel.<anonymous>' call
        var nextValue = prevValue.vvx(this.rvw_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.aqq();
    launch(tmp_2, VOID, VOID, ContentEntryDetailAttemptsSessionListViewModel$slambda_0(this, null));
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).wvx = function (entry) {
    Companion_getInstance_117();
    var tmp = to('personUid', this.qvw_1.toString());
    Companion_getInstance_117();
    var tmp_0 = to('entryid', this.pvw_1.toString());
    Companion_getInstance_117();
    var tmp_1 = to('contextRegistrationIdHi', entry.hjj_1.toString());
    Companion_getInstance_117();
    this.lqp_1.wp8('ContentEntryDetailAttemptsStatementList', mapOf([tmp, tmp_0, tmp_1, to('contextRegistrationIdLo', entry.ijj_1.toString())]));
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).it3 = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsSessionListViewModel.onSortOrderChanged.<anonymous>' call
        var tmp0_attemptsSessionList = this.rvw_1;
        var nextValue = prevValue.vvx(tmp0_attemptsSessionList, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).yqy = function (searchText) {
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).zqy = 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().qnm_1;
      var tmp_2 = new SortOrderOption(tmp_1, 1, null);
      var tmp_3 = strings_getInstance().kml_1;
      var tmp_4 = new SortOrderOption(tmp_3, 2, null);
      var tmp_5 = strings_getInstance().lml_1;
      var tmp_6 = new SortOrderOption(tmp_5, 3, true);
      var tmp_7 = strings_getInstance().lml_1;
      var tmp_8 = new SortOrderOption(tmp_7, 4, false);
      var tmp_9 = strings_getInstance().mml_1;
      var tmp_10 = new SortOrderOption(tmp_9, 5, true);
      var tmp_11 = strings_getInstance().mml_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.evx_1 = attemptsSessionList;
    this.fvx_1 = sortOptions;
    this.gvx_1 = sortOption;
    this.hvx_1 = showSortOptions;
  }
  protoOf(ContentEntryDetailAttemptsSessionListUiState).xvx = function (attemptsSessionList, sortOptions, sortOption, showSortOptions) {
    return new ContentEntryDetailAttemptsSessionListUiState(attemptsSessionList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).vvx = function (attemptsSessionList, sortOptions, sortOption, showSortOptions, $super) {
    attemptsSessionList = attemptsSessionList === VOID ? this.evx_1 : attemptsSessionList;
    sortOptions = sortOptions === VOID ? this.fvx_1 : sortOptions;
    sortOption = sortOption === VOID ? this.gvx_1 : sortOption;
    showSortOptions = showSortOptions === VOID ? this.hvx_1 : showSortOptions;
    return $super === VOID ? this.xvx(attemptsSessionList, sortOptions, sortOption, showSortOptions) : $super.xvx.call(this, attemptsSessionList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).toString = function () {
    return 'ContentEntryDetailAttemptsSessionListUiState(attemptsSessionList=' + this.evx_1 + ', sortOptions=' + this.fvx_1 + ', sortOption=' + this.gvx_1 + ', showSortOptions=' + this.hvx_1 + ')';
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).hashCode = function () {
    var result = hashCode(this.evx_1);
    result = imul(result, 31) + hashCode(this.fvx_1) | 0;
    result = imul(result, 31) + this.gvx_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hvx_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.evx_1, tmp0_other_with_cast.evx_1))
      return false;
    if (!equals(this.fvx_1, tmp0_other_with_cast.fvx_1))
      return false;
    if (!this.gvx_1.equals(tmp0_other_with_cast.gvx_1))
      return false;
    if (!(this.hvx_1 === tmp0_other_with_cast.hvx_1))
      return false;
    return true;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.gvy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).ivy = function (verbs, $completion) {
    var tmp = this.jvy(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.ivy((!(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.gvy_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.qvy(VOID, VOID, VOID, VOID, this.hvy_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).jvy = function (verbs, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda(this.gvy_1, completion);
    i.hvy_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.ivy(verbs, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.zvy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).avs = function (contentEntry, $completion) {
    var tmp = this.bvs(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.avs((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.zvy_1.nqp_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.avz_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.oav_1;
              var nextValue = prevValue.vq8(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).bvs = function (contentEntry, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1(this.zvy_1, completion);
    i.avz_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.avs(contentEntry, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.jvz_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.jvz_1.fqq().j7e().xjf(this.jvz_1.mw0_1, this.jvz_1.nw0_1, this.jvz_1.lw0_1, this.jvz_1.ow0_1);
            var tmp_1 = ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_0(this.jvz_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.jvz_1, completion);
    i.kvz_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.zw0_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.zw0_1.fqq().v7d().yau(this.zw0_1.ow0_1);
            var tmp_1 = ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_2(this.zw0_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.zw0_1, completion);
    i.aw1_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.jw1_1 = $this_launch;
    this.kw1_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.jw1_1, VOID, VOID, ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_0(this.kw1_1, null));
          launch(this.jw1_1, VOID, VOID, ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_2(this.kw1_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.jw1_1, this.kw1_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.pw0_1;
    formatStatementResponseUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_147() {
    this.lw1_1 = 'ContentEntryDetailAttemptsStatementList';
  }
  var Companion_instance_196;
  function Companion_getInstance_164() {
    return Companion_instance_196;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_23(function_0) {
    this.mw1_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_23).t1d = function (value, $completion) {
    return this.mw1_1(value, $completion);
  };
  function ContentEntryDetailAttemptsStatementListViewModel$attemptsStatementListPagingSource$lambda(this$0) {
    return function () {
      return this$0.fqq().j7e().wjf(this$0.mw0_1, this$0.nw0_1, this$0.bqq(), this$0.lw0_1, this$0.ow0_1, toQueryLikeParam(this$0.nqp_1.t2().nq8_1.cq8_1), this$0.eqy_1.t2().mvy_1.cqf_1, this$0.eqy_1.t2().pvy_1);
    };
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda(this$0, resultContinuation) {
    this.vw1_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.vw1_1.eqy_1, ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda_0(this.ww1_1, this.vw1_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.vw1_1, completion);
    i.ww1_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_117();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.lw0_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_117();
    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.mw0_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    Companion_getInstance_117();
    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.nw0_1 = tmp1_elvis_lhs_1 == null ? new Long(0, 0) : tmp1_elvis_lhs_1;
    var tmp_2 = this;
    Companion_getInstance_117();
    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.ow0_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.pw0_1 = Instance(this_0, tmp$ret$0, null).a5d(this, formatStatementResponseUseCase$factory());
    var tmp_5 = this;
    tmp_5.qw0_1 = ContentEntryDetailAttemptsStatementListViewModel$attemptsStatementListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqy_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.<anonymous>' call
        var nextValue = prevValue.qvy(this.qw0_1);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.nqp_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.vq8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.mqz(true));
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_6 = this.aqq();
    launch(tmp_6, VOID, VOID, ContentEntryDetailAttemptsStatementListViewModel$slambda_0(this, null));
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).yqy = function (searchText) {
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).it3 = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.onSortOrderChanged.<anonymous>' call
        var tmp0_attemptsStatementList = this.qw0_1;
        var nextValue = prevValue.qvy(tmp0_attemptsStatementList, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).xw1 = function (verbEntity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.onVerbFilterToggled.<anonymous>' call
        var nextValue = prevValue.qvy(VOID, VOID, VOID, VOID, VOID, toggle(prevValue.pvy_1, verbEntity.yjk_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).zqy = function () {
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).yw1 = function (statementEntity) {
    return _get_formatStatementResponseUseCase__m72qwj(this).wpz(statementEntity.sjk_1, statementEntity.vjk_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().oml_1;
      var tmp_2 = new SortOrderOption(tmp_1, 1, true);
      var tmp_3 = strings_getInstance().oml_1;
      var tmp_4 = new SortOrderOption(tmp_3, 2, false);
      var tmp_5 = strings_getInstance().lml_1;
      var tmp_6 = new SortOrderOption(tmp_5, 3, false);
      var tmp_7 = strings_getInstance().lml_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.kvy_1 = attemptsStatementList;
    this.lvy_1 = sortOptions;
    this.mvy_1 = sortOption;
    this.nvy_1 = showSortOptions;
    this.ovy_1 = availableVerbs;
    this.pvy_1 = deselectedVerbUids;
  }
  protoOf(ContentEntryDetailAttemptsStatementListUiState).zw1 = function (attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids) {
    return new ContentEntryDetailAttemptsStatementListUiState(attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids);
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).qvy = function (attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids, $super) {
    attemptsStatementList = attemptsStatementList === VOID ? this.kvy_1 : attemptsStatementList;
    sortOptions = sortOptions === VOID ? this.lvy_1 : sortOptions;
    sortOption = sortOption === VOID ? this.mvy_1 : sortOption;
    showSortOptions = showSortOptions === VOID ? this.nvy_1 : showSortOptions;
    availableVerbs = availableVerbs === VOID ? this.ovy_1 : availableVerbs;
    deselectedVerbUids = deselectedVerbUids === VOID ? this.pvy_1 : deselectedVerbUids;
    return $super === VOID ? this.zw1(attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids) : $super.zw1.call(this, attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids);
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).toString = function () {
    return 'ContentEntryDetailAttemptsStatementListUiState(attemptsStatementList=' + this.kvy_1 + ', sortOptions=' + this.lvy_1 + ', sortOption=' + this.mvy_1 + ', showSortOptions=' + this.nvy_1 + ', availableVerbs=' + this.ovy_1 + ', deselectedVerbUids=' + this.pvy_1 + ')';
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).hashCode = function () {
    var result = hashCode(this.kvy_1);
    result = imul(result, 31) + hashCode(this.lvy_1) | 0;
    result = imul(result, 31) + this.mvy_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nvy_1) | 0;
    result = imul(result, 31) + hashCode(this.ovy_1) | 0;
    result = imul(result, 31) + hashCode(this.pvy_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.kvy_1, tmp0_other_with_cast.kvy_1))
      return false;
    if (!equals(this.lvy_1, tmp0_other_with_cast.lvy_1))
      return false;
    if (!this.mvy_1.equals(tmp0_other_with_cast.mvy_1))
      return false;
    if (!(this.nvy_1 === tmp0_other_with_cast.nvy_1))
      return false;
    if (!equals(this.ovy_1, tmp0_other_with_cast.ovy_1))
      return false;
    if (!equals(this.pvy_1, tmp0_other_with_cast.pvy_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.bji_1, _this__u8e3s4.aji_1);
  }
  function get_statementSummary_0(_this__u8e3s4) {
    return new StatementSummaryEntity(_this__u8e3s4.njj_1, _this__u8e3s4.mjj_1);
  }
  function get_verbDisplayName(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.ujk_1;
    var tmp3_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fjl_1;
    var tmp;
    if (tmp3_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.tjk_1;
      var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zjk_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.aw2_1 = successful;
    this.bw2_1 = completed;
  }
  protoOf(StatementSummaryEntity).toString = function () {
    return 'StatementSummaryEntity(successful=' + this.aw2_1 + ', completed=' + this.bw2_1 + ')';
  };
  protoOf(StatementSummaryEntity).hashCode = function () {
    var result = this.aw2_1 == null ? 0 : getBooleanHashCode(this.aw2_1);
    result = imul(result, 31) + getBooleanHashCode(this.bw2_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.aw2_1 == tmp0_other_with_cast.aw2_1))
      return false;
    if (!(this.bw2_1 === tmp0_other_with_cast.bw2_1))
      return false;
    return true;
  };
  function get_descriptionStringRes(_this__u8e3s4) {
    return _this__u8e3s4.aw2_1 === true ? strings_getInstance().nmn_1 : _this__u8e3s4.aw2_1 === false ? strings_getInstance().mmn_1 : _this__u8e3s4.bw2_1 ? strings_getInstance().rmn_1 : strings_getInstance().qmn_1;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.kw2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).mw2 = function (it, $completion) {
    var tmp = this.nw2(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.mw2((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.kw2_1.kw3_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.nw4(VOID, this.lw2_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).nw2 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.kw2_1, completion);
    i.lw2_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.mw2(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.ww4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).erl = function (db, $completion) {
    var tmp = this.jo1(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.erl(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.xw4_1.v7d().uau(this.ww4_1.yw3_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).jo1 = function (db, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this.ww4_1, completion);
    i.xw4_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.erl(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.gw5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).iw5 = function (it, $completion) {
    var tmp = this.jw5(it, $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.iw5((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;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.gw5_1.kw3_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.nw4(VOID, VOID, this.hw5_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_3).jw5 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.gw5_1, completion);
    i.hw5_1 = it;
    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 (it, $completion) {
      return i.iw5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.sw5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).uw5 = function (it, $completion) {
    var tmp = this.vw5(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.uw5((!(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.sw5_1.kw3_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.nw4(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.tw5_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).vw5 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.sw5_1, completion);
    i.tw5_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.uw5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.ew6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).gw6 = function (it, $completion) {
    var tmp = this.hw6(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.gw6((!(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.ew6_1.kw3_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.nw4(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.fw6_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).hw6 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.ew6_1, completion);
    i.fw6_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.gw6(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this$0, resultContinuation) {
    this.qw6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).sw6 = function (it, $completion) {
    var tmp = this.tw6(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.sw6((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.qw6_1.kw3_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.nw4(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.rw6_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).tw6 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this.qw6_1, completion);
    i.rw6_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.sw6(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$lambda() {
    return 'Could not get list of jobs';
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.cw7_1 = this$0;
    this.dw7_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.cw7_1.fqq().v7d();
            Companion_getInstance_126();
            var tmp0_safe_receiver = this.dw7_1.ba('courseBlockUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_1 = tmp_0.tau(this.cw7_1.dqp_1, this.cw7_1.xw3_1, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this.cw7_1.bqq());
            var tmp_2 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.cw7_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.cw7_1, this.dw7_1, completion);
    i.ew7_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.nw7_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_170();
            if (this.nw7_1.yw3_1.equals(new Long(1, 0))) {
              var tmp_0 = this;
              tmp_0.pw7_1 = this.nw7_1.jqq().vol(strings_getInstance().cnk_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_1 = this.nw7_1.fqq();
              suspendResult = localFirstThenRepoIfNull(tmp_1, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(this.nw7_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.pw7_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var parentTitle = this.pw7_1;
            l$ret$1: do {
              var this_0 = this.nw7_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.vq8(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.nw7_1, completion);
    i.ow7_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.nqp_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.vq8(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.yw7_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.yw7_1.fqq().i7f().hbq(this.yw7_1.dqp_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.yw7_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_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this.yw7_1, completion);
    i.zw7_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.iw8_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.iw8_1.dqq().j7f();
            var tmp_1 = tmp_0.rid(this.iw8_1.dqp_1, 1);
            var tmp_2 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.iw8_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.iw8_1, completion);
    i.jw8_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.sw8_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.sw8_1.dqq().c7f().obb(this.sw8_1.dqp_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.sw8_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.sw8_1, completion);
    i.tw8_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.cw9_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.cw9_1.dqq().l7f().dfr(this.cw9_1.dqp_1, this.cw9_1.ew9().q64_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_10(this.cw9_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.cw9_1, completion);
    i.dw9_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.nw9_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.pw9_1 = _get_httpClient__2ty1zc_0(this.nw9_1);
            var tmp_1 = this;
            tmp_1.qw9_1 = this.nw9_1.zqp().voc().xnv_1 + 'api/contententryimportjob/importjobs';
            var tmp_2 = this;
            tmp_2.rw9_1 = this.pw9_1;
            var tmp_3 = this;
            tmp_3.sw9_1 = this.rw9_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.qw9_1);
            parameter(this_0, 'contententryuid', this.nw9_1.dqp_1.toString());
            header(this_0, 'cache-control', 'no-store');
            tmp_4.tw9_1 = this_0;
            this.tw9_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_5 = this;
            tmp_5.uw9_1 = this.sw9_1;
            var tmp_6 = this;
            tmp_6.vw9_1 = this.tw9_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.vw9_1, this.uw9_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 3:
            var remoteImportJobsJson = suspendResult;
            var remoteImportJobs = this.nw9_1.m4r().s45(ListSerializer(Companion_instance_40.n4r()), remoteImportJobsJson);
            var tmp$ret$0;
            l$ret$1: do {
              var this_1 = this.nw9_1.kw3_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.nw4(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.iw4_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);
              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.nw9_1, completion);
    i.ow9_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.fwa_1 = $this_launch;
    this.gwa_1 = this$0;
    this.hwa_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.fwa_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_0(this.gwa_1, this.hwa_1, null));
          if (this.gwa_1.xw3_1.equals(new Long(0, 0)) ? !this.gwa_1.yw3_1.equals(new Long(0, 0)) : false) {
            launch(this.fwa_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_2(this.gwa_1, null));
          }
          launchSetTitleFromClazzUid(this.gwa_1, this.gwa_1.xw3_1, ContentEntryDetailOverviewViewModel$slambda$slambda$lambda(this.gwa_1));
          launch(this.fwa_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_4(this.gwa_1, null));
          launch(this.fwa_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_6(this.gwa_1, null));
          launch(this.fwa_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_8(this.gwa_1, null));
          launch(this.fwa_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_10(this.gwa_1, null));
          launch(this.fwa_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_12(this.gwa_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.fwa_1, this.gwa_1, this.hwa_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.qwa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).np9 = function (it, $completion) {
    var tmp = this.jo1(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.np9(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.rwa_1.i7f().gbq(this.qwa_1.dqp_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).jo1 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this.qwa_1, completion);
    i.rwa_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.np9(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.lw3_1;
    makeContentEntryAvailableOfflineUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelDownloadUseCase__t8wbc4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mw3_1;
    cancelDownloadUseCase$factory_0();
    return this_0.t2();
  }
  function _get_defaultLaunchContentEntryUseCase__lyydsx($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pw3_1;
    defaultLaunchContentEntryUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchXapiUseCase__jmtlap($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qw3_1;
    launchXapiUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchEpubUseCase__sunqd7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rw3_1;
    launchEpubUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelImportContentEntryUseCase__kqom1e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.tw3_1;
    cancelImportContentEntryUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelRemoteContentEntryImportUseCase__8yb0xk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.uw3_1;
    cancelRemoteContentEntryImportUseCase$factory_0();
    return this_0.t2();
  }
  function _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vw3_1;
    dismissRemoteContentEntryImportErrorUseCase$factory_0();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ww3_1;
    httpClient$factory_2();
    return this_0.t2();
  }
  function Companion_148() {
    this.swa_1 = 'ContentEntryDetailOverviewView';
    this.twa_1 = 'target';
  }
  var Companion_instance_197;
  function Companion_getInstance_165() {
    return Companion_instance_197;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_24(function_0) {
    this.uwa_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_24).t1d = function (value, $completion) {
    return this.uwa_1(value, $completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.dwb_1 = this$0;
    this.ewb_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.dwb_1.kw3_1, ContentEntryDetailOverviewViewModel$slambda$slambda_0(this.fwb_1, this.dwb_1, this.ewb_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.dwb_1, this.ewb_1, completion);
    i.fwb_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.owb_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.owb_1.lqq(Companion_getInstance_98().cq9_1);
            Napier_getInstance().i5e('ContentEntryDetailOverviewViewModel: onClickOpen launched');
            l$ret$1: do {
              var this_0 = this.owb_1.kw3_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.nw4(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.owb_1.fqq();
            suspendResult = localFirstThenRepoIfNull(tmp_0, ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda_0(this.owb_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.rwb_1 = suspendResult;
            var tmp_1 = this;
            var tmp0_safe_receiver = this.owb_1.sw3_1;
            var tmp_2;
            if (tmp0_safe_receiver == null) {
              tmp_2 = null;
            } else {
              tmp_2 = Companion_instance_99.cmi(tmp0_safe_receiver);
            }

            var tmp1_elvis_lhs = tmp_2;
            tmp_1.swb_1 = tmp1_elvis_lhs == null ? LinkTarget_DEFAULT_getInstance() : tmp1_elvis_lhs;
            if (!(this.rwb_1 == null)) {
              var tmp_3 = this;
              var tmp2_subject = this.rwb_1.oax_1;
              var tmp_4;
              if (tmp2_subject === 'xapi') {
                tmp_4 = _get_launchXapiUseCase__jmtlap(this.owb_1);
              } else {
                if (tmp2_subject === 'epub') {
                  tmp_4 = _get_launchEpubUseCase__sunqd7(this.owb_1);
                } else {
                  tmp_4 = null;
                }
              }
              tmp_3.twb_1 = tmp_4;
              var tmp_5 = this;
              var tmp3_elvis_lhs = this.twb_1;
              tmp_5.uwb_1 = tmp3_elvis_lhs == null ? _get_defaultLaunchContentEntryUseCase__lyydsx(this.owb_1) : tmp3_elvis_lhs;
              Napier_getInstance().i5e('ContentEntryDetailOverviewViewModel: onClickOpen : Launching using ' + this.uwb_1);
              this.hd_1 = 3;
              Companion_getInstance_126();
              var tmp4_safe_receiver = this.owb_1.jqp_1.ba('courseBlockUid');
              var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toLong_0(tmp4_safe_receiver);
              suspendResult = this.uwb_1.xp8(this.rwb_1, this.owb_1.lqp_1, this.owb_1.xw3_1, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs, this.swb_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              Napier_getInstance().i5e('ContentEntryDetailOverviewViewModel: onClickOpen: latestContentEntryVersion = null');
              this.owb_1.hqq().kq9(new Snack(this.owb_1.jqq().vol(strings_getInstance().ano_1)));
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.qwb_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.owb_1.hqq().kq9(new Snack(this.owb_1.jqq().vol(strings_getInstance().xmj_1) + (':' + e.message)));
              Napier_getInstance().m5e('ContentEntryDetailOverview: Exception opening content', e);
              tmp_7.qwb_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.owb_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$5: do {
              var this_1 = this.owb_1.kw3_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.nw4(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.owb_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$7: do {
              var this_2 = this.owb_1.kw3_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.nw4(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.owb_1, completion);
    i.pwb_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.dwc_1 = this$0;
    this.ewc_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.dwc_1).ap7(this.ewc_1, this.dwc_1.bqq(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.dwc_1.hqq().kq9(new Snack(this.dwc_1.jqq().vol(strings_getInstance().qmk_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.dwc_1.hqq().kq9(new Snack(this.dwc_1.jqq().vol(strings_getInstance().xmj_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.dwc_1, this.ewc_1, completion);
    i.fwc_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.owc_1 = this$0;
    this.pwc_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.owc_1).ap7(this.pwc_1, this.owc_1.bqq(), 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.owc_1.hqq().kq9(new Snack(this.owc_1.jqq().vol(strings_getInstance().xmj_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.owc_1, this.pwc_1, completion);
    i.qwc_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.kw3_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.lw3_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.mw3_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.nw3_1 = Instance(this_2, tmp$ret$4, null).a5d(this, nodeIdAndAuth$factory());
    this.ow3_1 = asStateFlow(this.kw3_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.pw3_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.qw3_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.rw3_1 = InstanceOrNull(this_5, tmp$ret$10, null).a5d(this, launchEpubUseCase$factory());
    this.sw3_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.tw3_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.uw3_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.vw3_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.ww3_1 = Instance(di, tmp$ret$18, null).a5d(this, httpClient$factory_1());
    var tmp_19 = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_19.xw3_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_20 = this;
    Companion_getInstance_126();
    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.yw3_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_9 = this.kw3_1;
      while (true) {
        var prevValue = this_9.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewViewModel.<anonymous>' call
        var nextValue = prevValue.nw4(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.bqq());
        if (this_9.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_21 = this.aqq();
    launch(tmp_21, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(ContentEntryDetailOverviewViewModel).ew9 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.nw3_1;
    nodeIdAndAuth$factory_0();
    return this_0.t2();
  };
  protoOf(ContentEntryDetailOverviewViewModel).rwc = function () {
    Napier_getInstance().i5e('ContentEntryDetailOverviewViewModel: onClickOpen');
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onClickOpen$slambda_0(this, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).swc = function (jobUid) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda_0(this, jobUid, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).twc = function (jobUid) {
    var tmp = this.aqq();
    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) {
    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;
    this.zw3_1 = scoreProgress;
    this.aw4_1 = contentEntry;
    this.bw4_1 = latestContentEntryVersion;
    this.cw4_1 = contentEntryButtons;
    this.dw4_1 = locallyAvailable;
    this.ew4_1 = markCompleteVisible;
    this.fw4_1 = translationVisibile;
    this.gw4_1 = availableTranslations;
    this.hw4_1 = activeImportJobs;
    this.iw4_1 = remoteImportJobs;
    this.jw4_1 = activeUploadJobs;
    this.kw4_1 = offlineItemAndState;
    this.lw4_1 = openButtonEnabled;
    this.mw4_1 = activeUserPersonUid;
  }
  protoOf(ContentEntryDetailOverviewUiState).uwc = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.aw4_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).vwc = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.aw4_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).wwc = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.aw4_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).xwc = function () {
    return false;
  };
  protoOf(ContentEntryDetailOverviewUiState).ywc = function () {
    return !(this.zw3_1 == null);
  };
  protoOf(ContentEntryDetailOverviewUiState).zwc = function () {
    var tmp0_safe_receiver = this.bw4_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).awd = function () {
    var tmp0_safe_receiver = this.bw4_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).bwd = function (importJobProgress) {
    return importJobProgress.ubb_1.equals(this.mw4_1);
  };
  protoOf(ContentEntryDetailOverviewUiState).cwd = function (scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid) {
    return new ContentEntryDetailOverviewUiState(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid);
  };
  protoOf(ContentEntryDetailOverviewUiState).nw4 = function (scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid, $super) {
    scoreProgress = scoreProgress === VOID ? this.zw3_1 : scoreProgress;
    contentEntry = contentEntry === VOID ? this.aw4_1 : contentEntry;
    latestContentEntryVersion = latestContentEntryVersion === VOID ? this.bw4_1 : latestContentEntryVersion;
    contentEntryButtons = contentEntryButtons === VOID ? this.cw4_1 : contentEntryButtons;
    locallyAvailable = locallyAvailable === VOID ? this.dw4_1 : locallyAvailable;
    markCompleteVisible = markCompleteVisible === VOID ? this.ew4_1 : markCompleteVisible;
    translationVisibile = translationVisibile === VOID ? this.fw4_1 : translationVisibile;
    availableTranslations = availableTranslations === VOID ? this.gw4_1 : availableTranslations;
    activeImportJobs = activeImportJobs === VOID ? this.hw4_1 : activeImportJobs;
    remoteImportJobs = remoteImportJobs === VOID ? this.iw4_1 : remoteImportJobs;
    activeUploadJobs = activeUploadJobs === VOID ? this.jw4_1 : activeUploadJobs;
    offlineItemAndState = offlineItemAndState === VOID ? this.kw4_1 : offlineItemAndState;
    openButtonEnabled = openButtonEnabled === VOID ? this.lw4_1 : openButtonEnabled;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.mw4_1 : activeUserPersonUid;
    return $super === VOID ? this.cwd(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid) : $super.cwd.call(this, scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid);
  };
  protoOf(ContentEntryDetailOverviewUiState).toString = function () {
    return 'ContentEntryDetailOverviewUiState(scoreProgress=' + this.zw3_1 + ', contentEntry=' + this.aw4_1 + ', latestContentEntryVersion=' + this.bw4_1 + ', contentEntryButtons=' + this.cw4_1 + ', locallyAvailable=' + this.dw4_1 + ', markCompleteVisible=' + this.ew4_1 + ', translationVisibile=' + this.fw4_1 + ', availableTranslations=' + this.gw4_1 + ', activeImportJobs=' + this.hw4_1 + ', remoteImportJobs=' + this.iw4_1 + ', activeUploadJobs=' + this.jw4_1 + ', offlineItemAndState=' + this.kw4_1 + ', openButtonEnabled=' + this.lw4_1 + ', activeUserPersonUid=' + this.mw4_1.toString() + ')';
  };
  protoOf(ContentEntryDetailOverviewUiState).hashCode = function () {
    var result = this.zw3_1 == null ? 0 : this.zw3_1.hashCode();
    result = imul(result, 31) + (this.aw4_1 == null ? 0 : this.aw4_1.hashCode()) | 0;
    result = imul(result, 31) + (this.bw4_1 == null ? 0 : this.bw4_1.hashCode()) | 0;
    result = imul(result, 31) + (this.cw4_1 == null ? 0 : hashCode(this.cw4_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dw4_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ew4_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fw4_1) | 0;
    result = imul(result, 31) + hashCode(this.gw4_1) | 0;
    result = imul(result, 31) + hashCode(this.hw4_1) | 0;
    result = imul(result, 31) + hashCode(this.iw4_1) | 0;
    result = imul(result, 31) + hashCode(this.jw4_1) | 0;
    result = imul(result, 31) + (this.kw4_1 == null ? 0 : this.kw4_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lw4_1) | 0;
    result = imul(result, 31) + this.mw4_1.hashCode() | 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.zw3_1, tmp0_other_with_cast.zw3_1))
      return false;
    if (!equals(this.aw4_1, tmp0_other_with_cast.aw4_1))
      return false;
    if (!equals(this.bw4_1, tmp0_other_with_cast.bw4_1))
      return false;
    if (!equals(this.cw4_1, tmp0_other_with_cast.cw4_1))
      return false;
    if (!(this.dw4_1 === tmp0_other_with_cast.dw4_1))
      return false;
    if (!(this.ew4_1 === tmp0_other_with_cast.ew4_1))
      return false;
    if (!(this.fw4_1 === tmp0_other_with_cast.fw4_1))
      return false;
    if (!equals(this.gw4_1, tmp0_other_with_cast.gw4_1))
      return false;
    if (!equals(this.hw4_1, tmp0_other_with_cast.hw4_1))
      return false;
    if (!equals(this.iw4_1, tmp0_other_with_cast.iw4_1))
      return false;
    if (!equals(this.jw4_1, tmp0_other_with_cast.jw4_1))
      return false;
    if (!equals(this.kw4_1, tmp0_other_with_cast.kw4_1))
      return false;
    if (!(this.lw4_1 === tmp0_other_with_cast.lw4_1))
      return false;
    if (!this.mw4_1.equals(tmp0_other_with_cast.mw4_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.ew9();
    }, 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 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.ew9();
    }, 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 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.fwe_1) {
        var tmp_0 = $this$shallowCopy;
        tmp_0.jaw_1 = 2;
        var tmp_1 = $this$shallowCopy;
        Companion_getInstance_126();
        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.bqq();
        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.owe_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).zqc = function (it, $completion) {
    var tmp = this.aqd(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.zqc(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.pwe_1.gqc_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.owe_1.cwe_1.t2().qwe_1;
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.tk8_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.owe_1.cwf(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).aqd = function (it, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda(this.owe_1, completion);
    i.pwe_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.zqc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda$lambda($newSubtitleTrack) {
    return function (it) {
      return it.foj_1 === $newSubtitleTrack.foj_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.lwf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).zqc = function (navResult, $completion) {
    var tmp = this.aqd(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.zqc(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.mwf_1.gqc_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.lwf_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).aqd = function (navResult, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda_1(this.lwf_1, completion);
    i.mwf_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.zqc(navResult, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.vwf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda).zwf = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.zwf(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.wwf_1;
            var tmp_1;
            if (!this.vwf_1.rqv_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            var tmp0_safe_receiver = tmp_1;
            tmp_0.xwf_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v7d();
            if (this.xwf_1 == null) {
              this.ywf_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.xwf_1.sau(this.vwf_1.rqv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ywf_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp2_safe_receiver = this.ywf_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.vwf_1.rqv_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).jo1 = function (db, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda(this.vwf_1, completion);
    i.wwf_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.zwf(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.iwg_1 = this$0;
    this.jwg_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).lwg = 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.lwg($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.iwg_1.dqq());
            tmp_0.kwg_1 = tmp_1.n62(42);
            this.hd_1 = 1;
            suspendResult = this.iwg_1.oqq(this.jwg_1, 'metadata', Companion_instance_82.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.soj_1;
              var pictureUri = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fax_1;
              if (!(pictureUri == null)) {
                Companion_getInstance_124();
                this.jwg_1.mql('initPicUri', '');
              }
              var tmp_3 = shallowCopy_8(importedMetaData.poj_1, ContentEntryEditViewModel$slambda$slambda$lambda(this.kwg_1, this.iwg_1, this.jwg_1));
              var tmp1_cjiPluginId = importedMetaData.qoj_1;
              var tmp2_sourceUri = importedMetaData.poj_1.wav_1;
              var tmp3_cjiOriginalFilename = importedMetaData.roj_1;
              var tmp4_cjiOwnerPersonUid = this.iwg_1.bqq();
              var tmp_4 = new ContentEntryImportJob(VOID, tmp2_sourceUri, tmp3_cjiOriginalFilename, this.kwg_1, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_cjiPluginId, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_cjiOwnerPersonUid);
              var tmp5_safe_receiver = importedMetaData.soj_1;
              var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.jkj(this.kwg_1);
              var this_0 = new ContentEntryAndContentJob(tmp_3, VOID, tmp_4, tmp6_elvis_lhs == null ? new ContentEntryPicture2(this.kwg_1) : tmp6_elvis_lhs);
              var tmp_5 = this.iwg_1.jqq();
              var tmp_6 = strings_getInstance().und_1;
              var tmp0_elvis_lhs = importedMetaData.roj_1;
              var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? importedMetaData.poj_1.wav_1 : tmp0_elvis_lhs;
              this.jwg_1.mql('savedTitle', tmp_5.wol(tmp_6, [tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs]));
              tmp_2 = this_0;
            } else {
              var this_1 = new ContentEntry();
              this_1.nav_1 = this.kwg_1;
              var tmp_7 = this_1;
              var tmp0_safe_receiver_0 = this.jwg_1.ba('leaf');
              tmp_7.caw_1 = (tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0)) === true;
              this_1.iaw_1 = this.iwg_1.bqq();
              tmp_2 = new ContentEntryAndContentJob(this_1, VOID, VOID, new ContentEntryPicture2(this.kwg_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.iwg_1, this.jwg_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.lwg($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.cwe_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.vk8_1;
          var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : paramSubtitles(tmp1_safe_receiver, this$0.m4r());
          var nextValue = prevValue.mwg(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.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.vwg_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.vwg_1.nqq(this.vwg_1.gqq(), 'contentEntryDesc');
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda$slambda_0(this.vwg_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.vwg_1, completion);
    i.wwg_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.fwh_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.fwh_1.nqq(this.fwh_1.gqq(), 'subtitleKey');
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda$slambda_2(this.fwh_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.fwh_1, completion);
    i.gwh_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.cwe_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.bwf_1);
        var tmp0_safe_receiver = prevValue.qwe_1;
        var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vk8_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_81.n4r()), updatedSubtitles);
        this_1.s(key, value);
        var contentJobParam = this_1;
        var tmp4_safe_receiver = prevValue.qwe_1;
        var tmp;
        if (tmp4_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp3_safe_receiver = prevValue.qwe_1.vk8_1;
          tmp = tmp4_safe_receiver.yk8(VOID, VOID, tmp3_safe_receiver == null ? null : tmp3_safe_receiver.yki(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.mwg(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.qwe_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_126();
    var key = 'entityState';
    var tmp0_safe_receiver = $this.qqv_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = $this;
    var tmp_0 = $this.aqq();
    tmp.qqv_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.xwe_1 == null);
  }
  function Companion_149() {
    this.hwh_1 = 'leaf';
    this.iwh_1 = 'courseBlock';
    this.jwh_1 = 'ContentEntryEdit';
    this.kwh_1 = 'metadata';
    this.lwh_1 = 'savedTitle';
    this.mwh_1 = 'goToOnContentEntryDone';
    this.nwh_1 = 'contentEntryDesc';
    this.owh_1 = 'subtitleKey';
    this.pwh_1 = 1;
    this.qwh_1 = 2;
  }
  var Companion_instance_198;
  function Companion_getInstance_166() {
    return Companion_instance_198;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_25(function_0) {
    this.rwh_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_25).t1d = function (value, $completion) {
    return this.rwh_1(value, $completion);
  };
  function ContentEntryEditViewModel$slambda(this$0, resultContinuation) {
    this.awi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda).hsg = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda).he = function (p1, $completion) {
    return this.hsg(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.awi_1.fwe_1) {
              this.cwi_1 = true;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = this.bwi_1.p7f();
              var tmp_1 = this.awi_1.bqq();
              PermissionFlags_getInstance();
              suspendResult = tmp_0.yi1(tmp_1, new Long(65536, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.cwi_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.cwi_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).jo1 = function (db, completion) {
    var i = new ContentEntryEditViewModel$slambda(this.awi_1, completion);
    i.bwi_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.hsg(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.lwi_1 = this$0;
    this.mwi_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.lwi_1, null);
            var tmp_2 = ContentEntryEditViewModel$slambda$slambda_2(this.lwi_1, this.mwi_1, null);
            suspendResult = this.lwi_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, ContentEntryEditViewModel$slambda$lambda(this.lwi_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var it = suspendResult;
            Companion_getInstance_124();
            var tmp1_safe_receiver = it == null ? null : it.wk8_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.fax_1;
            setIfNoValueSetYet(this.mwi_1, 'initPicUri', tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
            var tmp0_safe_receiver = this.lwi_1.cwe_1.t2().qwe_1;
            var tmp1_safe_receiver_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tk8_1;
            var isLeaf = (tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.caw_1) === true;
            var savedStateTitle = this.mwi_1.ba('savedTitle');
            var title = !(savedStateTitle == null) ? savedStateTitle : (this.lwi_1.rqv_1.equals(new Long(0, 0)) ? !isLeaf : false) ? this.lwi_1.jqq().vol(strings_getInstance().unb_1) : (!this.lwi_1.rqv_1.equals(new Long(0, 0)) ? !isLeaf : false) ? this.lwi_1.jqq().vol(strings_getInstance().ann_1) : this.lwi_1.jqq().vol(strings_getInstance().znm_1);
            l$ret$1: do {
              var this_0 = this.lwi_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.lwi_1.jqq();
                var tmp0_subject = this.lwi_1.ewe_1;
                var tmp_4 = tmp_3.vol(tmp0_subject === 1 ? strings_getInstance().cml_1 : tmp0_subject === 2 ? strings_getInstance().amt_1 : strings_getInstance().on4_1);
                var nextValue = prevValue.vq8(VOID, VOID, title, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_4, VOID, ContentEntryEditViewModel$onClickSave$ref(this.lwi_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.lwi_1.cwe_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mwg(VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            launch(this.nwi_1, VOID, VOID, ContentEntryEditViewModel$slambda$slambda_4(this.lwi_1, null));
            launch(this.nwi_1, VOID, VOID, ContentEntryEditViewModel$slambda$slambda_6(this.lwi_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.lwi_1, this.mwi_1, completion);
    i.nwi_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.wwi_1 = $commitDelay;
    this.xwi_1 = $entity;
    this.ywi_1 = $this;
    this.zwi_1 = $key;
    this.awj_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.wwi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.xwi_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ywi_1.pqq(this.ywi_1.jqp_1, this.zwi_1, this.awj_1, this.xwi_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.wwi_1, this.xwi_1, this.ywi_1, this.zwi_1, this.awj_1, completion);
    i.bwj_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.foj_1 === $subtitleTrack.foj_1)) {
          destination.i1(element);
        }
      }
      return destination;
    };
  }
  function ContentEntryEditViewModel$onClickSave$slambda(this$0, $contentEntryVal, $entityVal, resultContinuation) {
    this.kwj_1 = this$0;
    this.lwj_1 = $contentEntryVal;
    this.mwj_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_126();
            var tmp0_safe_receiver = this.kwj_1.jqp_1.ba('parentUid');
            tmp_0.owj_1 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            this.hd_1 = 1;
            var tmp_1 = this.kwj_1.rqv_1.equals(new Long(0, 0)) ? this.owj_1 : null;
            Companion_getInstance_124();
            suspendResult = this.kwj_1.awe_1.qpd(this.lwj_1, tmp_1, this.mwj_1.wk8_1, this.kwj_1.jqp_1.ba('initPicUri'), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.pwj_1 = this.mwj_1.vk8_1;
            if (!(this.pwj_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.kwj_1.bwe_1.xp7(this.pwj_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_126();
            var popUpToOnFinish = this.kwj_1.jqp_1.ba('popUpToOnFinish');
            if (!(this.kwj_1.kqq() == null)) {
              this.kwj_1.uqv(this.lwj_1);
            } else {
              this.kwj_1.lqp_1.vqb(popUpToOnFinish == null ? this.kwj_1.kqp_1 : popUpToOnFinish, true);
            }

            if (hasErrors_2(this.kwj_1.cwe_1.t2(), this.kwj_1)) {
              this.kwj_1.lqq(Companion_getInstance_98().dq9_1);
              l$ret$1: do {
                var this_0 = this.kwj_1.cwe_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.mwg(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.kwj_1, this.lwj_1, this.mwj_1, completion);
    i.nwj_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.awe_1 = saveContentEntryUseCase;
    this.bwe_1 = enqueueContentEntryImportUseCase;
    this.cwe_1 = MutableStateFlow(new ContentEntryEditUiState());
    this.dwe_1 = asStateFlow(this.cwe_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.ewe_1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    this.fwe_1 = this.ewe_1 === 1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_6 = ContentEntryEditViewModel$slambda_0(this, null);
    this.vqq(tmp_6, VOID, VOID, ContentEntryEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(ContentEntryEditViewModel).cwf = function (contentEntry) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.cwe_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.qwe_1;
        var nextValue = prevValue.mwg(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yk8(contentEntry));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$1;
    scheduleEntityCommit(this, updatedState.qwe_1);
  };
  protoOf(ContentEntryEditViewModel).yub = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.cwe_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.qwe_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.qwe_1.wk8_1;
          tmp = tmp1_safe_receiver.yk8(VOID, VOID, VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.jkj(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.mwg(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$1;
    scheduleEntityCommit(this, updatedState.qwe_1);
  };
  protoOf(ContentEntryEditViewModel).qwj = function (compressionLevel) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.cwe_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.qwe_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.qwe_1.vk8_1;
          tmp = tmp1_safe_receiver.yk8(VOID, VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yki(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, compressionLevel.mp4_1));
        }
        var nextValue = prevValue.mwg(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ContentEntryEditViewModel).rwj = function (uri, fileName) {
    var tmp = Companion_instance_81.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.rqq('GetSubtitle', 'subtitleKey', null, tmp, tmp$ret$2);
  };
  protoOf(ContentEntryEditViewModel).swj = function (subtitleTrack) {
    this.rqq('SubtitleEdit', 'subtitleKey', subtitleTrack, Companion_instance_81.n4r());
  };
  protoOf(ContentEntryEditViewModel).twj = function (subtitleTrack) {
    updateSubtitles(this, ContentEntryEditViewModel$onClickDeleteSubtitleTrack$lambda(subtitleTrack));
  };
  protoOf(ContentEntryEditViewModel).vsd = function () {
    var entityVal = this.cwe_1.t2().qwe_1;
    var tmp0_safe_receiver = this.cwe_1.t2().qwe_1;
    var contentEntry = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tk8_1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.cwe_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.jqq().vol(strings_getInstance().gnn_1);
        } else {
          tmp = null;
        }
        var nextValue = prevValue.mwg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_2(this.cwe_1.t2(), this)) {
      this.lqq(Companion_getInstance_98().dq9_1);
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.cwe_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.mwg(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.tk8_1;
    var tmp_0;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp2_elvis_lhs;
    }
    var contentEntryVal = tmp_0;
    if (!this.cwe_1.t2().uwe_1) {
      return Unit_instance;
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.cwe_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.mwg(VOID, VOID, VOID, VOID, false);
        if (this_3.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    if (this.ewe_1 === 1) {
      Companion_getInstance_175();
      // 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_175();
      var key = 'SelectedContentEntry';
      var value = this.m4r().r45(Companion_instance_41.n4r(), entityVal);
      this_4.s(key, value);
      this.xqq(this_4, Companion_getInstance_175().awk_1);
      var tmp$ret$9 = this_4.f3();
      this.lqp_1.wp8('CourseBlockEdit', tmp$ret$9);
    } else if (this.ewe_1 === 2) {
      this.uqv(entityVal);
    } else {
      var tmp_1 = this.aqq();
      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.qwe_1 = entity;
    this.rwe_1 = licenceOptions;
    this.swe_1 = storageOptions;
    this.twe_1 = courseBlockEditUiState;
    this.uwe_1 = fieldsEnabled;
    this.vwe_1 = updateContentVisible;
    this.wwe_1 = importError;
    this.xwe_1 = titleError;
    this.ywe_1 = selectedContainerStorageDir;
    this.zwe_1 = metadataResult;
    this.awf_1 = compressionEnabled;
    this.bwf_1 = subtitles;
  }
  protoOf(ContentEntryEditUiState).bwk = function () {
    var tmp0_safe_receiver = this.qwe_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vk8_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vbc_1;
    return tmp === 101;
  };
  protoOf(ContentEntryEditUiState).cwk = 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).mwg = function (entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles, $super) {
    entity = entity === VOID ? this.qwe_1 : entity;
    licenceOptions = licenceOptions === VOID ? this.rwe_1 : licenceOptions;
    storageOptions = storageOptions === VOID ? this.swe_1 : storageOptions;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? this.twe_1 : courseBlockEditUiState;
    fieldsEnabled = fieldsEnabled === VOID ? this.uwe_1 : fieldsEnabled;
    updateContentVisible = updateContentVisible === VOID ? this.vwe_1 : updateContentVisible;
    importError = importError === VOID ? this.wwe_1 : importError;
    titleError = titleError === VOID ? this.xwe_1 : titleError;
    selectedContainerStorageDir = selectedContainerStorageDir === VOID ? this.ywe_1 : selectedContainerStorageDir;
    metadataResult = metadataResult === VOID ? this.zwe_1 : metadataResult;
    compressionEnabled = compressionEnabled === VOID ? this.awf_1 : compressionEnabled;
    subtitles = subtitles === VOID ? this.bwf_1 : subtitles;
    return $super === VOID ? this.cwk(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) : $super.cwk.call(this, entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles);
  };
  protoOf(ContentEntryEditUiState).toString = function () {
    return 'ContentEntryEditUiState(entity=' + this.qwe_1 + ', licenceOptions=' + this.rwe_1 + ', storageOptions=' + this.swe_1 + ', courseBlockEditUiState=' + this.twe_1 + ', fieldsEnabled=' + this.uwe_1 + ', updateContentVisible=' + this.vwe_1 + ', importError=' + this.wwe_1 + ', titleError=' + this.xwe_1 + ', selectedContainerStorageDir=' + this.ywe_1 + ', metadataResult=' + this.zwe_1 + ', compressionEnabled=' + this.awf_1 + ', subtitles=' + this.bwf_1 + ')';
  };
  protoOf(ContentEntryEditUiState).hashCode = function () {
    var result = this.qwe_1 == null ? 0 : this.qwe_1.hashCode();
    result = imul(result, 31) + hashCode(this.rwe_1) | 0;
    result = imul(result, 31) + hashCode(this.swe_1) | 0;
    result = imul(result, 31) + this.twe_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uwe_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vwe_1) | 0;
    result = imul(result, 31) + (this.wwe_1 == null ? 0 : getStringHashCode(this.wwe_1)) | 0;
    result = imul(result, 31) + (this.xwe_1 == null ? 0 : getStringHashCode(this.xwe_1)) | 0;
    result = imul(result, 31) + (this.ywe_1 == null ? 0 : hashCode(this.ywe_1)) | 0;
    result = imul(result, 31) + (this.zwe_1 == null ? 0 : this.zwe_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.awf_1) | 0;
    result = imul(result, 31) + hashCode(this.bwf_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.qwe_1, tmp0_other_with_cast.qwe_1))
      return false;
    if (!equals(this.rwe_1, tmp0_other_with_cast.rwe_1))
      return false;
    if (!equals(this.swe_1, tmp0_other_with_cast.swe_1))
      return false;
    if (!this.twe_1.equals(tmp0_other_with_cast.twe_1))
      return false;
    if (!(this.uwe_1 === tmp0_other_with_cast.uwe_1))
      return false;
    if (!(this.vwe_1 === tmp0_other_with_cast.vwe_1))
      return false;
    if (!(this.wwe_1 == tmp0_other_with_cast.wwe_1))
      return false;
    if (!(this.xwe_1 == tmp0_other_with_cast.xwe_1))
      return false;
    if (!equals(this.ywe_1, tmp0_other_with_cast.ywe_1))
      return false;
    if (!equals(this.zwe_1, tmp0_other_with_cast.zwe_1))
      return false;
    if (!(this.awf_1 === tmp0_other_with_cast.awf_1))
      return false;
    if (!equals(this.bwf_1, tmp0_other_with_cast.bwf_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.zwk_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.getmetadata.ContentEntryGetMetadataViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.cwl(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_150() {
    this.dwl_1 = 'uri';
    this.ewl_1 = 'filename';
    this.fwl_1 = 'ContentEntryGetMetadata';
  }
  var Companion_instance_199;
  function Companion_getInstance_167() {
    return Companion_instance_199;
  }
  function ContentEntryGetMetadataViewModel$slambda(this$0, $uriArg, $fileName, resultContinuation) {
    this.owl_1 = this$0;
    this.pwl_1 = $uriArg;
    this.qwl_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.swl_1 = this.owl_1.ywk_1;
            this.twl_1 = Companion_getInstance_3().o2r(this.pwl_1);
            this.uwl_1 = this.owl_1.zqp().voc();
            this.hd_1 = 1;
            suspendResult = this.swl_1.qp5(this.twl_1, this.qwl_1, this.uwl_1, ContentEntryGetMetadataViewModel$slambda$lambda(this.owl_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.owl_1.m4r().r45(Companion_instance_82.n4r(), metadataResult));
            this.owl_1.xqq(this_0, Companion_getInstance_175().awk_1);
            Companion_getInstance_117();
            this.owl_1.wqq(this_0, 'result_viewname');
            Companion_getInstance_117();
            this.owl_1.wqq(this_0, 'result_key');
            Companion_getInstance_126();
            this.owl_1.wqq(this_0, 'parentUid');
            this.owl_1.lqp_1.uqb('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.owl_1.jqq().vol(strings_getInstance().fmv_1) + ' : ' + e.message;
              } else {
                if (e instanceof UnsupportedContentException) {
                  var tmp_2 = this.owl_1.jqq();
                  var tmp_3 = strings_getInstance().hmv_1;
                  var tmp3_elvis_lhs = e.message;
                  tmp_1 = tmp_2.wol(tmp_3, [tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs]);
                } else {
                  tmp_1 = this.owl_1.jqq().vol(strings_getInstance().xmj_1) + ' : other: ' + e.message;
                }
              }
              var errorMessage = tmp_1;
              l$ret$1: do {
                var this_1 = this.owl_1.zwk_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.cwl(prevValue.bwl_1.xp5(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.owl_1, this.pwl_1, this.qwl_1, completion);
    i.rwl_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.ywk_1 = contentEntryGetMetaDataFromUriUseCase;
    this.zwk_1 = MutableStateFlow(new ContentEntryGetMetadataUiState());
    this.awl_1 = asStateFlow(this.zwk_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.aqq();
    launch(tmp_3, VOID, VOID, ContentEntryGetMetadataViewModel$slambda_0(this, uriArg, fileName, null));
  }
  function ContentEntryGetMetadataUiState(status) {
    status = status === VOID ? new ContentEntryGetMetadataStatus() : status;
    this.bwl_1 = status;
  }
  protoOf(ContentEntryGetMetadataUiState).cwl = function (status) {
    return new ContentEntryGetMetadataUiState(status);
  };
  protoOf(ContentEntryGetMetadataUiState).toString = function () {
    return 'ContentEntryGetMetadataUiState(status=' + this.bwl_1 + ')';
  };
  protoOf(ContentEntryGetMetadataUiState).hashCode = function () {
    return this.bwl_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.bwl_1.equals(tmp0_other_with_cast.bwl_1))
      return false;
    return true;
  };
  function _get_getSubtitleTrackUseCase__ux9onr($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.swm_1;
    getSubtitleTrackUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_151() {
    this.twm_1 = 'GetSubtitle';
  }
  var Companion_instance_200;
  function Companion_getInstance_168() {
    return Companion_instance_200;
  }
  function GetSubtitleViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.cwn_1 = this$0;
    this.dwn_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.cwn_1);
            var tmp_1 = Companion_getInstance_3();
            var tmp_2 = tmp_1.o2r(require_0(this.dwn_1, 'uri'));
            suspendResult = tmp_0.dp6(tmp_2, require_0(this.dwn_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_126();
            this_0.s('entityState', this.cwn_1.m4r().r45(Companion_instance_81.n4r(), subtitleTrack));
            Companion_getInstance_126();
            this.cwn_1.wqq(this_0, 'result_viewname');
            Companion_getInstance_126();
            this.cwn_1.wqq(this_0, 'result_key');
            this.cwn_1.lqp_1.uqb('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.cwn_1.qwm_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.gwn(this.cwn_1.jqq().vol(strings_getInstance().xmj_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.cwn_1, this.dwn_1, completion);
    i.ewn_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.qwm_1 = MutableStateFlow(new GetSubtitleUiState());
    this.rwm_1 = asStateFlow(this.qwm_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.zqp().voc();
    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.swm_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.nqp_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.getsubtitle.GetSubtitleViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, this.jqq().vol(strings_getInstance().und_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.aqq();
    launch(tmp_3, VOID, VOID, GetSubtitleViewModel$slambda_0(this, savedStateHandle, null));
  }
  function GetSubtitleUiState(error) {
    error = error === VOID ? null : error;
    this.fwn_1 = error;
  }
  protoOf(GetSubtitleUiState).gwn = function (error) {
    return new GetSubtitleUiState(error);
  };
  protoOf(GetSubtitleUiState).toString = function () {
    return 'GetSubtitleUiState(error=' + this.fwn_1 + ')';
  };
  protoOf(GetSubtitleUiState).hashCode = function () {
    return this.fwn_1 == null ? 0 : getStringHashCode(this.fwn_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.fwn_1 == tmp0_other_with_cast.fwn_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.ewo_1;
    httpClient$factory_4();
    return this_0.t2();
  }
  function Companion_152() {
    this.hwo_1 = 'ContentEntryImportLink';
    this.iwo_1 = 'importUrl';
  }
  var Companion_instance_201;
  function Companion_getInstance_169() {
    return Companion_instance_201;
  }
  function ContentEntryImportLinkViewModel$onClickNext$ref($boundThis) {
    var l = function () {
      $boundThis.jwo();
      return Unit_instance;
    };
    l.callableName = 'onClickNext';
    return l;
  }
  function ContentEntryImportLinkViewModel$onChangeLink$slambda(this$0, $url, resultContinuation) {
    this.swo_1 = this$0;
    this.two_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.swo_1.jqp_1.mql('importUrl', this.two_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.swo_1, this.two_1, completion);
    i.uwo_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.dwp_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.hwp_1 = _get_httpClient__2ty1zc_1(this.dwp_1);
            var tmp_1 = this;
            tmp_1.iwp_1 = this.hwp_1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.dwp_1.zqp().voc().xnv_1 + 'api/import/validateLink');
            parameter(this_0, 'url', this.dwp_1.cwo_1.t2().owp_1);
            set_expectSuccess(this_0, false);
            tmp_2.jwp_1 = this_0;
            this.jwp_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_3 = this;
            tmp_3.kwp_1 = this.iwp_1;
            var tmp_4 = this;
            tmp_4.lwp_1 = this.jwp_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.lwp_1, this.kwp_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.mwp_1 = suspendResult;
            if (!this.mwp_1.j3b().equals(Companion_getInstance_0().f2y_1)) {
              l$ret$1: do {
                var this_1 = this.dwp_1.cwo_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.rwp(VOID, this.dwp_1.jqq().vol(strings_getInstance().emv_1), true);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.gwp_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.nwp_1 = this.dwp_1.m4r();
            this.hd_1 = 5;
            suspendResult = bodyAsText(this.mwp_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var string = suspendResult;
            var this_2 = this.nwp_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(MetadataResult), arrayOf([]), false));
            var metadataResult = this.nwp_1.s45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), string);
            var tmp_6 = this;
            var tmp_7;
            if (this.dwp_1.gwo_1 === 'ContentEntryEdit') {
              var this_4 = LinkedHashMap_init_$Create$();
              this_4.s('metadata', this.dwp_1.m4r().r45(Companion_instance_82.n4r(), metadataResult));
              this.dwp_1.wqq(this_4, 'courseBlock');
              this.dwp_1.wqq(this_4, 'goToOnContentEntryDone');
              Companion_getInstance_117();
              this.dwp_1.wqq(this_4, 'result_viewname');
              Companion_getInstance_117();
              this.dwp_1.wqq(this_4, 'result_key');
              Companion_getInstance_126();
              this.dwp_1.wqq(this_4, 'parentUid');
              Companion_getInstance_126();
              this_4.s('popUpToOnFinish', 'ContentEntryImportLink');
              this.dwp_1.lqp_1.wp8('ContentEntryEdit', this_4.f3());
              tmp_7 = Unit_instance;
            } else {
              this.dwp_1.uqv(metadataResult);
              tmp_7 = Unit_instance;
            }

            tmp_6.fwp_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.dwp_1.cwo_1;
              while (true) {
                var prevValue_0 = this_5.t2();
                var nextValue_0 = prevValue_0.rwp(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.dwp_1.hqq().kq9(new Snack(this.dwp_1.jqq().vol(strings_getInstance().xmj_1) + (': ' + e)));
              tmp_9.fwp_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.dwp_1.cwo_1;
              while (true) {
                var prevValue_1 = this_6.t2();
                var nextValue_1 = prevValue_1.rwp(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.dwp_1.cwo_1;
              while (true) {
                var prevValue_2 = this_7.t2();
                var nextValue_2 = prevValue_2.rwp(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.dwp_1, completion);
    i.ewp_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.cwo_1 = MutableStateFlow(new ContentEntryImportLinkUiState());
    this.dwo_1 = asStateFlow(this.cwo_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.ewo_1 = Instance(this, tmp$ret$0, null).a5d(this, httpClient$factory_3());
    this.fwo_1 = null;
    var tmp_1 = this;
    Companion_getInstance_126();
    tmp_1.gwo_1 = savedStateHandle.ba('next');
    var tmp_2 = this.jqq().vol(strings_getInstance().smu_1);
    var tmp_3 = this.jqq().vol(strings_getInstance().cml_1);
    this.nqp_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.cwo_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.rwp(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(ContentEntryImportLinkViewModel).swp = function (url) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.cwo_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onChangeLink.<anonymous>' call
        var nextValue = prevValue.rwp(url, !(url === prevValue.owp_1) ? null : prevValue.pwp_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this.fwo_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.aqq();
    tmp.fwo_1 = launch(tmp_0, VOID, VOID, ContentEntryImportLinkViewModel$onChangeLink$slambda_0(this, url, null));
  };
  protoOf(ContentEntryImportLinkViewModel).jwo = function () {
    if (!this.cwo_1.t2().qwp_1) {
      return Unit_instance;
    }
    if (isBlank(this.cwo_1.t2().owp_1)) {
      Napier_getInstance().i5e('link is blank');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.cwo_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onClickNext.<anonymous>' call
          var nextValue = prevValue.rwp(VOID, this.jqq().vol(strings_getInstance().cmp_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.cwo_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.rwp(VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp0_safe_receiver = this.fwo_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    this.jqp_1.mql('importUrl', this.cwo_1.t2().owp_1);
    var tmp = this.aqq();
    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.owp_1 = url;
    this.pwp_1 = linkError;
    this.qwp_1 = fieldsEnabled;
  }
  protoOf(ContentEntryImportLinkUiState).twp = function (url, linkError, fieldsEnabled) {
    return new ContentEntryImportLinkUiState(url, linkError, fieldsEnabled);
  };
  protoOf(ContentEntryImportLinkUiState).rwp = function (url, linkError, fieldsEnabled, $super) {
    url = url === VOID ? this.owp_1 : url;
    linkError = linkError === VOID ? this.pwp_1 : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? this.qwp_1 : fieldsEnabled;
    return $super === VOID ? this.twp(url, linkError, fieldsEnabled) : $super.twp.call(this, url, linkError, fieldsEnabled);
  };
  protoOf(ContentEntryImportLinkUiState).toString = function () {
    return 'ContentEntryImportLinkUiState(url=' + this.owp_1 + ', linkError=' + this.pwp_1 + ', fieldsEnabled=' + this.qwp_1 + ')';
  };
  protoOf(ContentEntryImportLinkUiState).hashCode = function () {
    var result = getStringHashCode(this.owp_1);
    result = imul(result, 31) + (this.pwp_1 == null ? 0 : getStringHashCode(this.pwp_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qwp_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.owp_1 === tmp0_other_with_cast.owp_1))
      return false;
    if (!(this.pwp_1 == tmp0_other_with_cast.pwp_1))
      return false;
    if (!(this.qwp_1 === tmp0_other_with_cast.qwp_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.uwp_1 : THROW_CCE();
    if (!$this.equals(tmp0_other_with_cast))
      return false;
    return true;
  }
  function ContentEntryListItemUiState(contentEntry) {
    this.uwp_1 = contentEntry;
  }
  protoOf(ContentEntryListItemUiState).toString = function () {
    return ContentEntryListItemUiState__toString_impl_2mjydu(this.uwp_1);
  };
  protoOf(ContentEntryListItemUiState).hashCode = function () {
    return ContentEntryListItemUiState__hashCode_impl_odpv6p(this.uwp_1);
  };
  protoOf(ContentEntryListItemUiState).equals = function (other) {
    return ContentEntryListItemUiState__equals_impl_d3bksl(this.uwp_1, other);
  };
  function get_listItemUiState_0(_this__u8e3s4) {
    return _ContentEntryListItemUiState___init__impl__r5o9qy(_this__u8e3s4);
  }
  function ContentEntryListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.dwq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).uqh = function (hasNewContentPermission, $completion) {
    var tmp = this.vqh(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.uqh((!(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.dwq_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              if (!(prevValue.uwq_1 === this.ewq_1)) {
                tmp_0 = prevValue.wwq(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ewq_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.dwq_1.nqp_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.vq8(prevValue_0.gq8_1.bq9(this.ewq_1 ? !this.dwq_1.cws_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).vqh = function (hasNewContentPermission, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda$slambda(this.dwq_1, completion);
    i.ewq_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.uqh(hasNewContentPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda(this$0, $hasPermissionFlow, resultContinuation) {
    this.nws_1 = this$0;
    this.ows_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.nws_1.ywr_1) {
              this.hd_1 = 2;
              var tmp_0 = ContentEntryListViewModel$slambda$slambda$slambda_0(this.nws_1, null);
              suspendResult = this.ows_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.nws_1, this.ows_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.xws_1 = $savedStateHandle;
    this.yws_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_1).zqc = function (result, $completion) {
    var tmp = this.aqd(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.zqc(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.zws_1.gqc_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.awt_1 = tmp_2;
            var tmp_3 = this;
            var tmp1_safe_receiver = this.xws_1.ba('entriesToMove');
            var tmp_4;
            if (tmp1_safe_receiver == null) {
              tmp_4 = null;
            } else {
              tmp_4 = this.yws_1.m4r().s45(ListSerializer(Companion_instance_204.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.bwt_1 = tmp_5;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_moveContentEntriesUseCase__fb3hfi(this.yws_1).jpc(this.awt_1, toSet(this.bwt_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.yws_1.hqq().kq9(new Snack(this.yws_1.jqq().wol(strings_getInstance().yna_1, [this.bwt_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.yws_1.hqq();
              var tmp3_elvis_lhs = e.message;
              tmp_7.kq9(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.yws_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).aqd = function (result, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_1(this.xws_1, this.yws_1, completion);
    i.zws_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.zqc(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).mwt = function (uiState, hasPermission, $completion) {
    var tmp = this.nwt(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.mwt(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.kwt_1, this.lwt_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).nwt = function (uiState, hasPermission, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_3(completion);
    i.kwt_1 = uiState;
    i.lwt_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.mwt(uiState, hasPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.wwt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_5).ywt = function (it, $completion) {
    var tmp = this.zwt(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.ywt(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.xwt_1.w6_1.rwq_1.c1()) {
            tmp_0 = this.xwt_1.x6_1;
          } else {
            tmp_0 = false;
          }
          var showMoveIcon = tmp_0;
          if (!(showMoveIcon === !this.wwt_1.nqp_1.t2().rq8_1.c1())) {
            l$ret$1: do {
              var this_0 = this.wwt_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_1;
                if (showMoveIcon) {
                  var tmp_2 = AppStateIcon_MOVE_getInstance();
                  var tmp_3 = this.wwt_1.jqq().vol(strings_getInstance().mmo_1);
                  var tmp_4 = new AppActionButton(tmp_2, tmp_3, ContentEntryListViewModel$onClickMoveAction$ref(this.wwt_1), 'action_move');
                  var tmp_5 = AppStateIcon_DELETE_getInstance();
                  var tmp_6 = this.wwt_1.jqq().vol(strings_getInstance().rmk_1);
                  tmp_1 = listOf([tmp_4, new AppActionButton(tmp_5, tmp_6, ContentEntryListViewModel$onClickDeleteAction$ref(this.wwt_1), 'action_delete')]);
                } else {
                  tmp_1 = emptyList();
                }
                var nextValue = prevValue.vq8(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).zwt = function (it, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_5(this.wwt_1, completion);
    i.xwt_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.ywt(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_moveContentEntriesUseCase__fb3hfi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dws_1;
    moveContentEntriesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_deleteEntriesUseCase__hkwqc9($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ews_1;
    deleteEntriesUseCase$factory_0();
    return this_0.t2();
  }
  function setSelectedItems($this, selectedEntries) {
    $this.jqp_1.mql('selectedEntries', $this.m4r().r45(ListSerializer(Companion_instance_204.n4r()), toList(selectedEntries)));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.setSelectedItems.<anonymous>' call
        var nextValue = prevValue.wwq(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.eqy_1.t2().rwq_1.u();
    var hasSelectedItems = numItemsSelected > 0;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = $this.nqp_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.jqq().awu(plurals_getInstance().fnu_1, numItemsSelected);
        } else {
          tmp = $this.bws_1;
        }
        var tmp1_title = tmp;
        var tmp_0;
        if (hasSelectedItems) {
          var tmp_1 = AppStateIcon_CLOSE_getInstance();
          var tmp_2 = $this.jqq().vol(strings_getInstance().gno_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.vq8(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.jqp_1.mql('entriesToMove', $this.m4r().r45(ListSerializer(Companion_instance_204.n4r()), toList(entries)));
    var tmp = Companion_instance_28.n4r();
    $this.rqq('PickContentEntry', 'moveToDestinationResult', null, tmp, mapOf([to('listMode', ListViewMode_PICKER_getInstance().iqm_1), to('selectFolder', 'true')]));
  }
  function onClickMoveAction($this) {
    selectDestinationToMoveEntries($this, $this.eqy_1.t2().rwq_1);
  }
  function launchDeleteEntries($this, entries) {
    var tmp = $this.aqq();
    launch(tmp, VOID, VOID, ContentEntryListViewModel$launchDeleteEntries$slambda_0($this, entries, null));
  }
  function onClickDeleteAction($this) {
    launchDeleteEntries($this, $this.eqy_1.t2().rwq_1);
  }
  function Companion_153() {
    Companion_instance_202 = this;
    this.bwu_1 = 'ContentEntries';
    this.cwu_1 = 'ContentEntryListHome';
    this.dwu_1 = 'PickContentEntry';
    this.ewu_1 = listOf(['ContentEntries', 'ContentEntryListHome', 'PickContentEntry']);
    this.fwu_1 = 'filter';
    this.gwu_1 = 1;
    this.hwu_1 = 2;
    this.iwu_1 = 3;
    this.jwu_1 = 4;
    this.kwu_1 = new Long(1, 0);
    this.lwu_1 = 'chipId';
    this.mwu_1 = 'moveToDestinationResult';
    this.nwu_1 = 'selectFolder';
    this.owu_1 = 'selectedEntries';
    this.pwu_1 = 'entriesToMove';
  }
  var Companion_instance_202;
  function Companion_getInstance_170() {
    if (Companion_instance_202 == null)
      new Companion_153();
    return Companion_instance_202;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_26(function_0) {
    this.qwu_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_26).t1d = function (value, $completion) {
    return this.qwu_1(value, $completion);
  };
  function createContextMenuItemsForEntry$entriesToAction(this$0, rightClickedItem) {
    var selectedEntries = this$0.eqy_1.t2().rwq_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.eqy_1.t2().hwq_1) {
        case 2:
          tmp = this$0.fqq().v7d().xau(this$0.bqq());
          break;
        case 3:
          tmp = this$0.fqq().v7d().wau(this$0.bqq());
          break;
        case 4:
          tmp = this$0.fqq().v7d().vau(this$0.bqq(), this$0.xwr_1, new Long(0, 0), new Long(0, 0), this$0.eqy_1.t2().mwq_1.cqf_1, false);
          break;
        case 1:
          tmp = this$0.fqq().v7d().vau(this$0.bqq(), this$0.xwr_1, new Long(0, 0), new Long(0, 0), this$0.eqy_1.t2().mwq_1.cqf_1, false);
          break;
        default:
          tmp = new EmptyPagingSource();
          break;
      }
      return tmp;
    };
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$ref($boundThis) {
    var l = function (p0) {
      return $boundThis.rwu(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.eqy_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.wwq(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.awv_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.awv_1.kqq() == null) ? !this.awv_1.zwr_1 : false) {
              this.cwv_1 = this.awv_1.jqq().vol(strings_getInstance().pnf_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              if (this.awv_1.xwr_1.equals(new Long(1, 0))) {
                this.cwv_1 = this.awv_1.jqq().vol(strings_getInstance().cnk_1);
                this.hd_1 = 2;
                continue $sm;
              } else {
                this.hd_1 = 1;
                suspendResult = this.awv_1.fqq().v7d().uau(this.awv_1.xwr_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 1:
            var tmp0_elvis_lhs = suspendResult;
            this.cwv_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var ARGUMENT = this.cwv_1;
            this.awv_1.bws_1 = ARGUMENT;
            l$ret$1: do {
              var this_0 = this.awv_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.vq8(VOID, VOID, this.awv_1.bws_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.awv_1, completion);
    i.bwv_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.lwv_1 = this$0;
    this.mwv_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.lwv_1.eqy_1, ContentEntryListViewModel$slambda$slambda_0(this.lwv_1, this.mwv_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.lwv_1, this.mwv_1, completion);
    i.nwv_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.wwv_1 = this$0;
    this.xwv_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.wwv_1.nqq(this.wwv_1.iqq(), 'moveToDestinationResult');
            var tmp_1 = ContentEntryListViewModel$slambda$slambda_2(this.xwv_1, this.wwv_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.wwv_1, this.xwv_1, completion);
    i.ywv_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.hww_1 = this$0;
    this.iww_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.hww_1.eqy_1, this.iww_1, ContentEntryListViewModel$slambda$slambda_4(null));
            var tmp_1 = ContentEntryListViewModel$slambda$slambda_6(this.hww_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.hww_1, this.iww_1, completion);
    i.jww_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.sww_1 = this$0;
    this.tww_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.sww_1).op5(this.tww_1, this.sww_1.bqq(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            setSelectedItems(this.sww_1, emptySet());
            this.sww_1.hqq().kq9(new Snack(this.sww_1.jqq().awu(plurals_getInstance().gnu_1, this.tww_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.sww_1, this.tww_1, completion);
    i.uww_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_170();
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryListUiState(), destName);
    var tmp = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('parentUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.xwr_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.ywr_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.zwr_1 = tmp1_elvis_lhs_0 == null ? false : tmp1_elvis_lhs_0;
    var tmp_3 = this;
    tmp_3.aws_1 = ContentEntryListViewModel$pagingSourceFactory$lambda(this);
    this.bws_1 = '';
    this.cws_1 = this.zwr_1 ? this.jqy().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.dws_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.ews_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_204.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.eqy_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
        var tmp0_contentEntryList = this.aws_1;
        var tmp1_showSelectFolderButton = this.cws_1;
        var tmp2_contextMenuItems = ContentEntryListViewModel$createContextMenuItemsForEntry$ref(this);
        var nextValue = prevValue.wwq(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.nqp_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
        var tmp_9 = this.jqq().vol(strings_getInstance().pn5_1);
        var tmp_10 = FabIcon_ADD_getInstance();
        var nextValue_0 = prevValue_0.vq8(new FabUiState(false, tmp_9, tmp_10, ContentEntryListViewModel$lambda(this)), VOID, VOID, VOID, this.jqy().equals(ListViewMode_PICKER_getInstance()));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    if (this.ywr_1 ? this.xwr_1.equals(new Long(1, 0)) : false) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.eqy_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().dnf_1, 2), new MessageIdOption2(strings_getInstance().anm_1, 3), new MessageIdOption2(strings_getInstance().cnk_1, 4)]);
          var nextValue_1 = prevValue_1.wwq(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.fqq().p7f();
    var tmp_12 = this.zqp().toc().cl0_1;
    PermissionFlags_getInstance();
    var hasPermissionFlow = shareIn(tmp_11.zi1(tmp_12, new Long(65536, 0)), this.aqq(), Companion_getInstance_12().v1h());
    var tmp_13 = this.aqq();
    launch(tmp_13, VOID, VOID, ContentEntryListViewModel$slambda_0(this, null));
    var tmp_14 = this.aqq();
    launch(tmp_14, VOID, VOID, ContentEntryListViewModel$slambda_2(this, hasPermissionFlow, null));
    var tmp_15 = this.aqq();
    launch(tmp_15, VOID, VOID, ContentEntryListViewModel$slambda_4(this, savedStateHandle, null));
    var tmp_16 = this.aqq();
    launch(tmp_16, VOID, VOID, ContentEntryListViewModel$slambda_6(this, hasPermissionFlow, null));
  }
  protoOf(ContentEntryListViewModel).rwu = function (entry) {
    var uiStateVal = this.eqy_1.t2();
    var tmp;
    if (uiStateVal.uwq_1 ? this.jqy().equals(ListViewMode_BROWSER_getInstance()) : false) {
      var rightClickedItem = asSelectedItem(entry);
      if (!uiStateVal.rwq_1.a1(rightClickedItem)) {
        setSelectedItems(this, emptySet());
      }
      var tmp_0 = this.jqq().vol(strings_getInstance().kno_1);
      var tmp_1 = new UstadContextMenuItem(tmp_0, ContentEntryListViewModel$createContextMenuItemsForEntry$lambda(this, rightClickedItem));
      var tmp_2 = this.jqq().vol(strings_getInstance().rmk_1);
      tmp = listOf([tmp_1, new UstadContextMenuItem(tmp_2, ContentEntryListViewModel$createContextMenuItemsForEntry$lambda_0(this, rightClickedItem))]);
    } else {
      tmp = emptyList();
    }
    return tmp;
  };
  protoOf(ContentEntryListViewModel).yqy = function (searchText) {
  };
  protoOf(ContentEntryListViewModel).zqy = function () {
  };
  protoOf(ContentEntryListViewModel).cvf = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onDismissCreateNewOptions.<anonymous>' call
        var nextValue = prevValue.wwq(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ContentEntryListViewModel).vww = function () {
    this.cvf();
    // 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_126();
    this_0.s('parentUid', this.xwr_1.toString());
    var tmp$ret$2 = this_0.f3();
    this.rqz('ContentEntryEdit', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).www = function () {
    this.cvf();
    // 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_126();
    this_0.s('parentUid', this.xwr_1.toString());
    Companion_getInstance_126();
    this_0.s('next', 'ContentEntryEdit');
    this.xqq(this_0, Companion_getInstance_175().awk_1);
    var tmp$ret$2 = this_0.f3();
    this.rqz('ContentEntryImportLink', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).xww = function (fileUri, fileName) {
    this.cvf();
    // 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_126();
    this_0.s('parentUid', this.xwr_1.toString());
    this.xqq(this_0, Companion_getInstance_175().awk_1);
    var tmp$ret$2 = this_0.f3();
    this.rqz('ContentEntryGetMetadata', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).yww = function (entry) {
    if (entry == null)
      return Unit_instance;
    var tmp0_safe_receiver = this.jqp_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.cws_1 : false)
      return Unit_instance;
    else {
      var tmp;
      if (this.jqy().equals(ListViewMode_PICKER_getInstance()) ? entry.caw_1 : false) {
        tmp = goToOnContentEntryEdit === 1;
      } else {
        tmp = false;
      }
      if (tmp) {
        Companion_getInstance_175();
        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.xqq(this_0, Companion_getInstance_175().awk_1);
        Companion_getInstance_175();
        this_0.s('SelectedContentEntry', this.m4r().r45(Companion_instance_41.n4r(), new ContentEntryAndContentJob(entry)));
        var tmp5_args = this_0.f3();
        this.rqq(tmp2_nextViewName, tmp3_key, null, tmp4_serializer, tmp5_args, VOID, false);
      } else {
        if (entry.caw_1) {
          Companion_getInstance_161();
          Companion_getInstance_117();
          var tmp_0 = to('entityUid', entry.nav_1.toString());
          Companion_getInstance_126();
          this.lqp_1.wp8('ContentEntry', mapOf([tmp_0, to('parentUid', this.xwr_1.toString())]));
        } else {
          var tmp_1;
          if (this.kqp_1 === 'ContentEntryListHome') {
            tmp_1 = 'ContentEntries';
          } else {
            tmp_1 = this.kqp_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_126();
          this_1.s('parentUid', entry.nav_1.toString());
          Companion_getInstance_117();
          this.wqq(this_1, 'result_key');
          Companion_getInstance_117();
          this.wqq(this_1, 'result_viewname');
          this.wqq(this_1, 'selectFolder');
          this.wqq(this_1, 'goToOnContentEntryDone');
          var tmp$ret$5 = this_1.f3();
          this.lqp_1.wp8(tmp_2, tmp$ret$5);
        }
      }
    }
  };
  protoOf(ContentEntryListViewModel).zww = 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.xwr_1;
    this.uqv(this_0);
  };
  protoOf(ContentEntryListViewModel).awx = function (entry, selected) {
    var currentSelection = this.eqy_1.t2().rwq_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.lp5_1.equals(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs)) {
          destination.i1(element);
        }
      }
      tmp = toSet(destination);
    }
    setSelectedItems(this, tmp);
  };
  protoOf(ContentEntryListViewModel).jt3 = function (filterOption) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.eqy_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().hwq_1 === filterOption.yq9_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.wwq(VOID, VOID, filterOption.yq9_1);
          if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    this.jqp_1.mql('chipId', filterOption.yq9_1.toString());
    this.gqy_1.i1h(new RefreshCommand());
  };
  function Companion_154() {
    Companion_instance_203 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().emo_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().emo_1;
    tmp.bwx_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 2, false)]);
  }
  var Companion_instance_203;
  function Companion_getInstance_171() {
    if (Companion_instance_203 == null)
      new Companion_154();
    return Companion_instance_203;
  }
  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_171();
    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_171().bwx_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.fwq_1 = filterMode;
    this.gwq_1 = contentEntryList;
    this.hwq_1 = selectedChipId;
    this.iwq_1 = filterOptions;
    this.jwq_1 = showHiddenEntries;
    this.kwq_1 = onlyFolderFilter;
    this.lwq_1 = sortOptions;
    this.mwq_1 = activeSortOption;
    this.nwq_1 = createNewFolderItemVisible;
    this.owq_1 = importFromLinkItemVisible;
    this.pwq_1 = importFromFileItemVisible;
    this.qwq_1 = createNewOptionsVisible;
    this.rwq_1 = selectedEntries;
    this.swq_1 = showSelectFolderButton;
    this.twq_1 = contextMenuItems;
    this.uwq_1 = hasWritePermission;
    var tmp_2 = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.rwq_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.lp5_1;
      destination.i1(tmp$ret$1);
    }
    tmp_2.vwq_1 = toSet(destination);
  }
  protoOf(ContentEntryListUiState).cwx = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.iwq_1.c1();
  };
  protoOf(ContentEntryListUiState).dwx = 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).wwq = function (filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission, $super) {
    filterMode = filterMode === VOID ? this.fwq_1 : filterMode;
    contentEntryList = contentEntryList === VOID ? this.gwq_1 : contentEntryList;
    selectedChipId = selectedChipId === VOID ? this.hwq_1 : selectedChipId;
    filterOptions = filterOptions === VOID ? this.iwq_1 : filterOptions;
    showHiddenEntries = showHiddenEntries === VOID ? this.jwq_1 : showHiddenEntries;
    onlyFolderFilter = onlyFolderFilter === VOID ? this.kwq_1 : onlyFolderFilter;
    sortOptions = sortOptions === VOID ? this.lwq_1 : sortOptions;
    activeSortOption = activeSortOption === VOID ? this.mwq_1 : activeSortOption;
    createNewFolderItemVisible = createNewFolderItemVisible === VOID ? this.nwq_1 : createNewFolderItemVisible;
    importFromLinkItemVisible = importFromLinkItemVisible === VOID ? this.owq_1 : importFromLinkItemVisible;
    importFromFileItemVisible = importFromFileItemVisible === VOID ? this.pwq_1 : importFromFileItemVisible;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? this.qwq_1 : createNewOptionsVisible;
    selectedEntries = selectedEntries === VOID ? this.rwq_1 : selectedEntries;
    showSelectFolderButton = showSelectFolderButton === VOID ? this.swq_1 : showSelectFolderButton;
    contextMenuItems = contextMenuItems === VOID ? this.twq_1 : contextMenuItems;
    hasWritePermission = hasWritePermission === VOID ? this.uwq_1 : hasWritePermission;
    return $super === VOID ? this.dwx(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) : $super.dwx.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.fwq_1 + ', contentEntryList=' + this.gwq_1 + ', selectedChipId=' + this.hwq_1 + ', filterOptions=' + this.iwq_1 + ', showHiddenEntries=' + this.jwq_1 + ', onlyFolderFilter=' + this.kwq_1 + ', sortOptions=' + this.lwq_1 + ', activeSortOption=' + this.mwq_1 + ', createNewFolderItemVisible=' + this.nwq_1 + ', importFromLinkItemVisible=' + this.owq_1 + ', importFromFileItemVisible=' + this.pwq_1 + ', createNewOptionsVisible=' + this.qwq_1 + ', selectedEntries=' + this.rwq_1 + ', showSelectFolderButton=' + this.swq_1 + ', contextMenuItems=' + this.twq_1 + ', hasWritePermission=' + this.uwq_1 + ')';
  };
  protoOf(ContentEntryListUiState).hashCode = function () {
    var result = this.fwq_1;
    result = imul(result, 31) + hashCode(this.gwq_1) | 0;
    result = imul(result, 31) + this.hwq_1 | 0;
    result = imul(result, 31) + hashCode(this.iwq_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jwq_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kwq_1) | 0;
    result = imul(result, 31) + hashCode(this.lwq_1) | 0;
    result = imul(result, 31) + this.mwq_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nwq_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.owq_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pwq_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qwq_1) | 0;
    result = imul(result, 31) + hashCode(this.rwq_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.swq_1) | 0;
    result = imul(result, 31) + hashCode(this.twq_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uwq_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.fwq_1 === tmp0_other_with_cast.fwq_1))
      return false;
    if (!equals(this.gwq_1, tmp0_other_with_cast.gwq_1))
      return false;
    if (!(this.hwq_1 === tmp0_other_with_cast.hwq_1))
      return false;
    if (!equals(this.iwq_1, tmp0_other_with_cast.iwq_1))
      return false;
    if (!(this.jwq_1 === tmp0_other_with_cast.jwq_1))
      return false;
    if (!(this.kwq_1 === tmp0_other_with_cast.kwq_1))
      return false;
    if (!equals(this.lwq_1, tmp0_other_with_cast.lwq_1))
      return false;
    if (!this.mwq_1.equals(tmp0_other_with_cast.mwq_1))
      return false;
    if (!(this.nwq_1 === tmp0_other_with_cast.nwq_1))
      return false;
    if (!(this.owq_1 === tmp0_other_with_cast.owq_1))
      return false;
    if (!(this.pwq_1 === tmp0_other_with_cast.pwq_1))
      return false;
    if (!(this.qwq_1 === tmp0_other_with_cast.qwq_1))
      return false;
    if (!equals(this.rwq_1, tmp0_other_with_cast.rwq_1))
      return false;
    if (!(this.swq_1 === tmp0_other_with_cast.swq_1))
      return false;
    if (!equals(this.twq_1, tmp0_other_with_cast.twq_1))
      return false;
    if (!(this.uwq_1 === tmp0_other_with_cast.uwq_1))
      return false;
    return true;
  };
  function Companion_155() {
  }
  protoOf(Companion_155).n4r = function () {
    return $serializer_getInstance_75();
  };
  var Companion_instance_204;
  function Companion_getInstance_172() {
    return Companion_instance_204;
  }
  function $serializer_63() {
    $serializer_instance_63 = 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.ewx_1 = tmp0_serialDesc;
  }
  protoOf($serializer_63).q44 = function () {
    return this.ewx_1;
  };
  protoOf($serializer_63).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_63).s44 = function (decoder) {
    var tmp0_desc = this.ewx_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_63).fwx = function (encoder, value) {
    var tmp0_desc = this.ewx_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.s49(tmp0_desc, 0, value.lp5_1);
    tmp1_output.s49(tmp0_desc, 1, value.mp5_1);
    tmp1_output.s49(tmp0_desc, 2, value.np5_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_63).r44 = function (encoder, value) {
    return this.fwx(encoder, value instanceof ContentEntryListSelectedItem ? value : THROW_CCE());
  };
  var $serializer_instance_63;
  function $serializer_getInstance_75() {
    if ($serializer_instance_63 == null)
      new $serializer_63();
    return $serializer_instance_63;
  }
  function ContentEntryListSelectedItem_init_$Init$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_75().ewx_1);
    }
    $this.lp5_1 = contentEntryUid;
    $this.mp5_1 = contentEntryParentChildJoinUid;
    $this.np5_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.lp5_1 = contentEntryUid;
    this.mp5_1 = contentEntryParentChildJoinUid;
    this.np5_1 = parentContentEntryUid;
  }
  protoOf(ContentEntryListSelectedItem).toString = function () {
    return 'ContentEntryListSelectedItem(contentEntryUid=' + this.lp5_1.toString() + ', contentEntryParentChildJoinUid=' + this.mp5_1.toString() + ', parentContentEntryUid=' + this.np5_1.toString() + ')';
  };
  protoOf(ContentEntryListSelectedItem).hashCode = function () {
    var result = this.lp5_1.hashCode();
    result = imul(result, 31) + this.mp5_1.hashCode() | 0;
    result = imul(result, 31) + this.np5_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.lp5_1.equals(tmp0_other_with_cast.lp5_1))
      return false;
    if (!this.mp5_1.equals(tmp0_other_with_cast.mp5_1))
      return false;
    if (!this.np5_1.equals(tmp0_other_with_cast.np5_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).pwx = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.pwx(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).jo1 = function (db, completion) {
    var i = new SubtitleEditViewModel$slambda$slambda(completion);
    i.owx_1 = db;
    return i;
  };
  function SubtitleEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SubtitleEditViewModel$slambda$slambda(resultContinuation);
    var l = function (db, $completion) {
      return i.pwx(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.ywx_1 = $savedStateHandle;
    this.zwx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda$slambda_1).awy = 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.awy($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.ywx_1.ba('uri');
          var tmp2_uri = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
          var tmp1_elvis_lhs = this.ywx_1.ba('filename');
          var tmp3_title = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
          var tmp4_langCode = _get_supportedLanguagesConfig__bd0744(this.zwx_1).spo_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.ywx_1, this.zwx_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.awy($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.zwy_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.ewz(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.ywy_1;
    supportedLanguagesConfig$factory_0();
    return this_0.t2();
  }
  function Companion_156() {
    this.fwz_1 = 'uri';
    this.gwz_1 = 'filename';
    this.hwz_1 = 'SubtitleEdit';
  }
  var Companion_instance_205;
  function Companion_getInstance_173() {
    return Companion_instance_205;
  }
  function SubtitleEditViewModel$onClickDone$ref($boundThis) {
    var l = function () {
      $boundThis.iwz();
      return Unit_instance;
    };
    l.callableName = 'onClickDone';
    return l;
  }
  function SubtitleEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.rwz_1 = this$0;
    this.swz_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_81.n4r();
            var tmp_1 = SubtitleEditViewModel$slambda$slambda_0(null);
            var tmp_2 = SubtitleEditViewModel$slambda$slambda_2(this.swz_1, this.rwz_1, null);
            suspendResult = this.rwz_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, SubtitleEditViewModel$slambda$lambda(this.rwz_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.rwz_1.zwy_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ewz(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.rwz_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.vq8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.oq8_1.wq7(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.rwz_1, this.swz_1, completion);
    i.twz_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.cx0_1 = $commitDelay;
    this.dx0_1 = $entity;
    this.ex0_1 = $this;
    this.fx0_1 = $key;
    this.gx0_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.cx0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.dx0_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ex0_1.pqq(this.ex0_1.jqp_1, this.fx0_1, this.gx0_1, this.dx0_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.cx0_1, this.dx0_1, this.ex0_1, this.fx0_1, this.gx0_1, completion);
    i.hx0_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.ywy_1 = Instance(this, tmp$ret$0, null).a5d(this, supportedLanguagesConfig$factory());
    this.zwy_1 = MutableStateFlow(new SubtitleEditUiState());
    this.awz_1 = asSharedFlow(this.zwy_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.<anonymous>' call
        var tmp_1 = this.jqq().vol(strings_getInstance().cns_1);
        var tmp_2 = this.jqq().vol(strings_getInstance().amt_1);
        var nextValue = prevValue.vq8(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.aqq();
    launch(tmp_3, VOID, VOID, SubtitleEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(SubtitleEditViewModel).ix0 = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.zwy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.ewz(entity);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_81.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_126();
    var key = 'entityState';
    var tmp0_safe_receiver = this.qqv_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.aqq();
    tmp.qqv_1 = launch(tmp_0, VOID, VOID, SubtitleEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SubtitleEditViewModel).iwz = function () {
    this.uqv(this.zwy_1.t2().bwz_1);
  };
  function SubtitleEditUiState(entity, titleError, fieldsEnabled) {
    entity = entity === VOID ? null : entity;
    titleError = titleError === VOID ? null : titleError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.bwz_1 = entity;
    this.cwz_1 = titleError;
    this.dwz_1 = fieldsEnabled;
  }
  protoOf(SubtitleEditUiState).jx0 = function (entity, titleError, fieldsEnabled) {
    return new SubtitleEditUiState(entity, titleError, fieldsEnabled);
  };
  protoOf(SubtitleEditUiState).ewz = function (entity, titleError, fieldsEnabled, $super) {
    entity = entity === VOID ? this.bwz_1 : entity;
    titleError = titleError === VOID ? this.cwz_1 : titleError;
    fieldsEnabled = fieldsEnabled === VOID ? this.dwz_1 : fieldsEnabled;
    return $super === VOID ? this.jx0(entity, titleError, fieldsEnabled) : $super.jx0.call(this, entity, titleError, fieldsEnabled);
  };
  protoOf(SubtitleEditUiState).toString = function () {
    return 'SubtitleEditUiState(entity=' + this.bwz_1 + ', titleError=' + this.cwz_1 + ', fieldsEnabled=' + this.dwz_1 + ')';
  };
  protoOf(SubtitleEditUiState).hashCode = function () {
    var result = this.bwz_1 == null ? 0 : this.bwz_1.hashCode();
    result = imul(result, 31) + (this.cwz_1 == null ? 0 : getStringHashCode(this.cwz_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dwz_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.bwz_1, tmp0_other_with_cast.bwz_1))
      return false;
    if (!(this.cwz_1 == tmp0_other_with_cast.cwz_1))
      return false;
    if (!(this.dwz_1 === tmp0_other_with_cast.dwz_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.kx0_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_157() {
    Companion_instance_206 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.kx0_1 = lazy(tmp_0, CourseBlockViewModelConstants$CompletionCriteria$Companion$_anonymous__1j6hl9);
  }
  protoOf(Companion_157).skc = 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.ox0_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_157).n4r = function () {
    return _get_$cachedSerializer__te6jhj_2(this);
  };
  protoOf(Companion_157).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_206;
  function Companion_getInstance_174() {
    CompletionCriteria_initEntries();
    if (Companion_instance_206 == null)
      new Companion_157();
    return Companion_instance_206;
  }
  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().qn7_1;
    CompletionCriteria_AUTOMATIC_instance = new CompletionCriteria('AUTOMATIC', 0, tmp, 0);
    var tmp_0 = strings_getInstance().pn7_1;
    CompletionCriteria_MIN_SCORE_instance = new CompletionCriteria('MIN_SCORE', 1, tmp_0, 1);
    var tmp_1 = strings_getInstance().rn7_1;
    CompletionCriteria_STUDENT_SELF_MARKS_instance = new CompletionCriteria('STUDENT_SELF_MARKS', 2, tmp_1, 2);
    var tmp_2 = strings_getInstance().wn7_1;
    CompletionCriteria_ASSIGNMENT_SUBMITTED_instance = new CompletionCriteria('ASSIGNMENT_SUBMITTED', 3, tmp_2, 100);
    var tmp_3 = strings_getInstance().gni_1;
    CompletionCriteria_ASSIGNMENT_GRADED_instance = new CompletionCriteria('ASSIGNMENT_GRADED', 4, tmp_3, 102);
    Companion_getInstance_174();
  }
  function CompletionCriteria(name, ordinal, stringResource, value) {
    Enum.call(this, name, ordinal);
    this.nx0_1 = stringResource;
    this.ox0_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.xx0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).zqc = function (result, $completion) {
    var tmp = this.aqd(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.zqc(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.yx0_1.gqc_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.xx0_1.wx1_1.t2().xu3_1;
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.sk9_1;
          this.xx0_1.yx1(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.mkn(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).aqd = function (result, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda(this.xx0_1, completion);
    i.yx0_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.zqc(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.hx2_1 = this$0;
    this.ix2_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).zqc = function (result, $completion) {
    var tmp = this.aqd(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.zqc(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.jx2_1.gqc_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.hx2_1.wx1_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = prevValue.xu3_1;
              var nextValue = prevValue.iu4(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.eka(VOID, VOID, contentEntryResult.tk8_1, VOID, contentEntryResult.vk8_1, contentEntryResult.uk8_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          this.ix2_1.mql('SavedSelectedContentEntry', this.hx2_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).aqd = function (result, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda_1(this.hx2_1, this.ix2_1, completion);
    i.jx2_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.zqc(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda).qu5 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.qu5(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).jo1 = function (it, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda(completion);
    i.sx2_1 = it;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.qu5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation) {
    this.bx3_1 = this$0;
    this.cx3_1 = $savedStateHandle;
    this.dx3_1 = $selectedContentEntry;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).au6 = 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.au6($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.bx3_1.dqq());
            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.cx3_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.dx3_1;
            var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.tk8_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.dx3_1;
            var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.tk8_1;
            tmp_4.y7x_1 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.pav_1;
            if (!(this.dx3_1 == null)) {
              var tmp_5 = this_0;
              var tmp6_safe_receiver = this.dx3_1.tk8_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.dx3_1;
            var tmp5_contentEntry = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.tk8_1;
            var tmp3_safe_receiver_0 = this.dx3_1;
            var tmp6_contentJob = tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.uk8_1;
            var tmp2_safe_receiver_0 = this.dx3_1;
            var tmp7_contentJobItem = tmp2_safe_receiver_0 == null ? null : tmp2_safe_receiver_0.vk8_1;
            var tmp8_courseBlockPicture = new CourseBlockPicture(newUid);
            var tmp1_safe_receiver = this.dx3_1;
            var tmp9_contentEntryPicture = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.wk8_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.bx3_1, this.cx3_1, this.dx3_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.au6($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.wx1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.iu4(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseBlockEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.mx3_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.mx3_1.nqq(this.mx3_1.iqq(), 'courseBlockDesc');
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda$slambda_0(this.mx3_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.mx3_1, completion);
    i.nx3_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.wx3_1 = this$0;
    this.xx3_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.wx3_1.nqq(this.wx3_1.iqq(), 'courseBlockEditContentEntry');
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda$slambda_2(this.wx3_1, this.xx3_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.wx3_1, this.xx3_1, completion);
    i.yx3_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_158() {
    Companion_instance_207 = this;
    this.uwj_1 = 'CourseBlockEdit';
    this.vwj_1 = 'SelectedContentEntry';
    this.wwj_1 = 'blockType';
    this.xwj_1 = 'courseBlockDesc';
    this.ywj_1 = 'courseBlockEditContentEntry';
    this.zwj_1 = 'SavedSelectedContentEntry';
    var tmp = this;
    Companion_getInstance_126();
    Companion_getInstance_117();
    Companion_getInstance_117();
    tmp.awk_1 = listOf(['blockType', 'clazzUid', 'goToOnContentEntryDone', 'blockType', 'result_viewname', 'result_key', 'listMode']);
  }
  var Companion_instance_207;
  function Companion_getInstance_175() {
    if (Companion_instance_207 == null)
      new Companion_158();
    return Companion_instance_207;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_27(function_0) {
    this.zx3_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_27).t1d = function (value, $completion) {
    return this.zx3_1(value, $completion);
  };
  function CourseBlockEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.ix4_1 = this$0;
    this.jx4_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.ix4_1.oqq(this.jx4_1, 'SelectedContentEntry', Companion_instance_41.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.lx4_1 = suspendResult;
            this.mx4_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.ix4_1, this.jx4_1, this.lx4_1, null);
            suspendResult = this.ix4_1.tqq(this.mx4_1, VOID, VOID, tmp_0, tmp_1, CourseBlockEditViewModel$slambda$lambda(this.ix4_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.nx4_1 = suspendResult;
            var tmp_2 = this;
            var tmp1_safe_receiver = this.nx4_1;
            tmp_2.ox4_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.uk9_1;
            var tmp_3 = this;
            var tmp2_safe_receiver = this.nx4_1;
            tmp_3.px4_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.sk9_1;
            if (!(this.ox4_1 == null) ? !(this.px4_1 == null) : false) {
              Companion_getInstance_116();
              if (this.jx4_1.ba('entity') == null) {
                this.qx4_1 = false;
                this.hd_1 = 4;
                continue $sm;
              } else {
                var tmp_4;
                var tmp_5 = this.ox4_1.jaw_1;
                if (tmp_5 === 2) {
                  tmp_4 = this.ox4_1.iaw_1.equals(this.px4_1.t7x_1);
                } else {
                  tmp_4 = false;
                }
                if (tmp_4) {
                  var tmp_6 = this;
                  tmp_6.qx4_1 = true;
                  this.hd_1 = 4;
                  continue $sm;
                } else {
                  var tmp_7 = this.ox4_1.jaw_1;
                  if (tmp_7 === 2) {
                    this.hd_1 = 3;
                    var tmp_8 = this.ix4_1.fqq().o7f();
                    var tmp_9 = this.ix4_1.bqq();
                    var tmp_10 = this.ox4_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.qx4_1 = false;
                    this.hd_1 = 4;
                    continue $sm;
                  }
                }
              }
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 3:
            this.qx4_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var canEditContentEntry = this.qx4_1;
            l$ret$1: do {
              var this_0 = this.ix4_1.wx1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.iu4(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.ix4_1.wx1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.iu4(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.ix4_1.nqp_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var tmp0_safe_receiver = this.px4_1;
                var tmp1_subject = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u7x_1;
                var tmp_11;
                if (tmp1_subject === 100) {
                  tmp_11 = this.ix4_1.tqw(strings_getInstance().pnk_1, strings_getInstance().anj_1);
                } else {
                  if (tmp1_subject === 102) {
                    tmp_11 = this.ix4_1.tqw(strings_getInstance().oni_1, strings_getInstance().onk_1);
                  } else {
                    if (tmp1_subject === 105) {
                      tmp_11 = this.ix4_1.tqw(strings_getInstance().qnl_1, strings_getInstance().rnl_1);
                    } else {
                      if (tmp1_subject === 104) {
                        tmp_11 = this.ix4_1.jqq().vol(strings_getInstance().fnq_1);
                      } else {
                        tmp_11 = '';
                      }
                    }
                  }
                }
                var tmp_12 = tmp_11;
                var tmp_13 = this.ix4_1.jqq().vol(strings_getInstance().amt_1);
                var nextValue_1 = prevValue_1.vq8(VOID, VOID, tmp_12, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_13, VOID, CourseBlockEditViewModel$onClickSave$ref(this.ix4_1)));
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            launch(this.kx4_1, VOID, VOID, CourseBlockEditViewModel$slambda$slambda_4(this.ix4_1, null));
            launch(this.kx4_1, VOID, VOID, CourseBlockEditViewModel$slambda$slambda_6(this.ix4_1, this.jx4_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.ix4_1, this.jx4_1, completion);
    i.kx4_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.zx4_1 = $commitDelay;
    this.ax5_1 = $entity;
    this.bx5_1 = $this;
    this.cx5_1 = $key;
    this.dx5_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.zx4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ax5_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.bx5_1.pqq(this.bx5_1.jqp_1, this.cx5_1, this.dx5_1, this.ax5_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.zx4_1, this.ax5_1, this.bx5_1, this.cx5_1, this.dx5_1, completion);
    i.ex5_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.nx5_1 = $commitDelay;
    this.ox5_1 = $entity;
    this.px5_1 = $this;
    this.qx5_1 = $key;
    this.rx5_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.nx5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ox5_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.px5_1.pqq(this.px5_1.jqp_1, this.qx5_1, this.rx5_1, this.ox5_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.nx5_1, this.ox5_1, this.px5_1, this.qx5_1, this.rx5_1, completion);
    i.sx5_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_175();
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseBlockEdit');
    this.wx1_1 = MutableStateFlow(new CourseBlockEditUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Companion_getInstance_9().emj().fmi()));
    this.xx1_1 = asStateFlow(this.wx1_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, VOID, VOID, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, CourseBlockEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(CourseBlockEditViewModel).yx1 = 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.wx1_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.xu3_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.eka(courseBlock);
        var tmp1_safe_receiver = prevValue.xu3_1;
        var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.sk9_1;
        var nextValue = prevValue.iu4(tmp, VOID, VOID, VOID, VOID, this.uqw(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.x7x_1, courseBlock.x7x_1, prevValue.cu4_1));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var blockAndEntities = tmp$ret$1.xu3_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_13().n4r();
    Companion_getInstance_116();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.aqq();
    tmp_0.qqv_1 = launch(tmp_1, VOID, VOID, CourseBlockEditViewModel$onEntityChanged$slambda_0(commitDelay, blockAndEntities, this, key, serializer, null));
  };
  protoOf(CourseBlockEditViewModel).tx5 = function () {
    var tmp0_safe_receiver = this.wx1_1.t2().xu3_1;
    var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cka();
    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.wx1_1.t2().xu3_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.sk9_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.rqq('ContentEntryEdit', 'courseBlockEditContentEntry', tmp, tmp_0, tmp$ret$3);
  };
  protoOf(CourseBlockEditViewModel).yub = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.wx1_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.xu3_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.xu3_1.tk9_1;
          tmp = tmp1_safe_receiver.eka(VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qkn(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.iu4(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var blockAndEntities = tmp$ret$1.xu3_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_13().n4r();
    Companion_getInstance_116();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.aqq();
    tmp_0.qqv_1 = launch(tmp_1, VOID, VOID, CourseBlockEditViewModel$onPictureChanged$slambda_0(commitDelay, blockAndEntities, this, key, serializer, null));
  };
  protoOf(CourseBlockEditViewModel).vsd = function () {
    var tmp0_elvis_lhs = this.wx1_1.t2().xu3_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.sk9_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.wx1_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.iu4(VOID, VOID, VOID, VOID, VOID, this.jqq().vol(strings_getInstance().gnn_1));
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (this.wx1_1.t2().mu8())
      return Unit_instance;
    this.uqv(this.wx1_1.t2().xu3_1);
  };
  function Companion_159() {
    Companion_instance_208 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.ux5_1 = [null, null, new ArrayListSerializer(Companion_getInstance_174().n4r()), null, null, null, null, null, null, null, null];
  }
  var Companion_instance_208;
  function Companion_getInstance_176() {
    if (Companion_instance_208 == null)
      new Companion_159();
    return Companion_instance_208;
  }
  function $serializer_64() {
    $serializer_instance_64 = 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.vx5_1 = tmp0_serialDesc;
  }
  protoOf($serializer_64).q44 = function () {
    return this.vx5_1;
  };
  protoOf($serializer_64).k4g = function () {
    var tmp0_cached = Companion_getInstance_176().ux5_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_64).s44 = function (decoder) {
    var tmp0_desc = this.vx5_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_176().ux5_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_64).wx5 = function (encoder, value) {
    var tmp0_desc = this.vx5_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_176().ux5_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.xu3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, $serializer_getInstance_7(), value.xu3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.yu3_1 === false)) {
      tmp1_output.o49(tmp0_desc, 1, value.yu3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !equals(value.zu3_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 2, tmp2_cached[2], value.zu3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.au4_1 === false)) {
      tmp1_output.o49(tmp0_desc, 3, value.au4_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.bu4_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.bu4_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.cu4_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, StringSerializer_getInstance(), value.cu4_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.du4_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, StringSerializer_getInstance(), value.du4_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.eu4_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 7, StringSerializer_getInstance(), value.eu4_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.fu4_1 === false)) {
      tmp1_output.o49(tmp0_desc, 8, value.fu4_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 9) ? true : !(value.gu4_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 9, StringSerializer_getInstance(), value.gu4_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 10) ? true : !(value.hu4_1 === 'UTC')) {
      tmp1_output.w49(tmp0_desc, 10, value.hu4_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_64).r44 = function (encoder, value) {
    return this.wx5(encoder, value instanceof CourseBlockEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_64;
  function $serializer_getInstance_76() {
    if ($serializer_instance_64 == null)
      new $serializer_64();
    return $serializer_instance_64;
  }
  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_76().vx5_1);
    }
    if (0 === (seen1 & 1))
      $this.xu3_1 = null;
    else
      $this.xu3_1 = block;
    if (0 === (seen1 & 2))
      $this.yu3_1 = false;
    else
      $this.yu3_1 = canEditSelectedContentEntry;
    if (0 === (seen1 & 4))
      $this.zu3_1 = emptyList();
    else
      $this.zu3_1 = completionCriteriaOptions;
    if (0 === (seen1 & 8))
      $this.au4_1 = false;
    else
      $this.au4_1 = fieldsEnabled;
    if (0 === (seen1 & 16))
      $this.bu4_1 = null;
    else
      $this.bu4_1 = caHideUntilDateError;
    if (0 === (seen1 & 32))
      $this.cu4_1 = null;
    else
      $this.cu4_1 = caTitleError;
    if (0 === (seen1 & 64))
      $this.du4_1 = null;
    else
      $this.du4_1 = caDeadlineError;
    if (0 === (seen1 & 128))
      $this.eu4_1 = null;
    else
      $this.eu4_1 = caMaxPointsError;
    if (0 === (seen1 & 256))
      $this.fu4_1 = false;
    else
      $this.fu4_1 = maxPointsRequired;
    if (0 === (seen1 & 512))
      $this.gu4_1 = null;
    else
      $this.gu4_1 = caGracePeriodError;
    if (0 === (seen1 & 1024))
      $this.hu4_1 = 'UTC';
    else
      $this.hu4_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_176();
    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.xu3_1 = block;
    this.yu3_1 = canEditSelectedContentEntry;
    this.zu3_1 = completionCriteriaOptions;
    this.au4_1 = fieldsEnabled;
    this.bu4_1 = caHideUntilDateError;
    this.cu4_1 = caTitleError;
    this.du4_1 = caDeadlineError;
    this.eu4_1 = caMaxPointsError;
    this.fu4_1 = maxPointsRequired;
    this.gu4_1 = caGracePeriodError;
    this.hu4_1 = timeZone;
  }
  protoOf(CourseBlockEditUiState).xx5 = function () {
    var tmp0_safe_receiver = this.xu3_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.sk9_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z7x_1;
    return tmp === 1;
  };
  protoOf(CourseBlockEditUiState).yx5 = function () {
    var tmp;
    if (this.zx5()) {
      var tmp0_safe_receiver = this.xu3_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.sk9_1;
      tmp = isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b7y_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).cu0 = function () {
    var tmp;
    if (this.yx5()) {
      var tmp0_safe_receiver = this.xu3_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.sk9_1;
      tmp = isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.d7y_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).ax6 = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.zu3_1.c1();
  };
  protoOf(CourseBlockEditUiState).zx5 = function () {
    var tmp;
    var tmp0_safe_receiver = this.xu3_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.sk9_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.xu3_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.sk9_1;
      var tmp_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.u7x_1;
      tmp = tmp_1 === 104;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).bx6 = function () {
    var tmp;
    var tmp0_safe_receiver = this.xu3_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.sk9_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.xu3_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.sk9_1;
      var tmp_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.u7x_1;
      tmp = tmp_1 === 104;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).mu8 = function () {
    return ((!(this.cu4_1 == null) ? true : !(this.du4_1 == null)) ? true : !(this.gu4_1 == null)) ? true : !(this.eu4_1 == null);
  };
  protoOf(CourseBlockEditUiState).cx6 = 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).iu4 = function (block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, $super) {
    block = block === VOID ? this.xu3_1 : block;
    canEditSelectedContentEntry = canEditSelectedContentEntry === VOID ? this.yu3_1 : canEditSelectedContentEntry;
    completionCriteriaOptions = completionCriteriaOptions === VOID ? this.zu3_1 : completionCriteriaOptions;
    fieldsEnabled = fieldsEnabled === VOID ? this.au4_1 : fieldsEnabled;
    caHideUntilDateError = caHideUntilDateError === VOID ? this.bu4_1 : caHideUntilDateError;
    caTitleError = caTitleError === VOID ? this.cu4_1 : caTitleError;
    caDeadlineError = caDeadlineError === VOID ? this.du4_1 : caDeadlineError;
    caMaxPointsError = caMaxPointsError === VOID ? this.eu4_1 : caMaxPointsError;
    maxPointsRequired = maxPointsRequired === VOID ? this.fu4_1 : maxPointsRequired;
    caGracePeriodError = caGracePeriodError === VOID ? this.gu4_1 : caGracePeriodError;
    timeZone = timeZone === VOID ? this.hu4_1 : timeZone;
    return $super === VOID ? this.cx6(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) : $super.cx6.call(this, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone);
  };
  protoOf(CourseBlockEditUiState).toString = function () {
    return 'CourseBlockEditUiState(block=' + this.xu3_1 + ', canEditSelectedContentEntry=' + this.yu3_1 + ', completionCriteriaOptions=' + this.zu3_1 + ', fieldsEnabled=' + this.au4_1 + ', caHideUntilDateError=' + this.bu4_1 + ', caTitleError=' + this.cu4_1 + ', caDeadlineError=' + this.du4_1 + ', caMaxPointsError=' + this.eu4_1 + ', maxPointsRequired=' + this.fu4_1 + ', caGracePeriodError=' + this.gu4_1 + ', timeZone=' + this.hu4_1 + ')';
  };
  protoOf(CourseBlockEditUiState).hashCode = function () {
    var result = this.xu3_1 == null ? 0 : this.xu3_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.yu3_1) | 0;
    result = imul(result, 31) + hashCode(this.zu3_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.au4_1) | 0;
    result = imul(result, 31) + (this.bu4_1 == null ? 0 : getStringHashCode(this.bu4_1)) | 0;
    result = imul(result, 31) + (this.cu4_1 == null ? 0 : getStringHashCode(this.cu4_1)) | 0;
    result = imul(result, 31) + (this.du4_1 == null ? 0 : getStringHashCode(this.du4_1)) | 0;
    result = imul(result, 31) + (this.eu4_1 == null ? 0 : getStringHashCode(this.eu4_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fu4_1) | 0;
    result = imul(result, 31) + (this.gu4_1 == null ? 0 : getStringHashCode(this.gu4_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.hu4_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.xu3_1, tmp0_other_with_cast.xu3_1))
      return false;
    if (!(this.yu3_1 === tmp0_other_with_cast.yu3_1))
      return false;
    if (!equals(this.zu3_1, tmp0_other_with_cast.zu3_1))
      return false;
    if (!(this.au4_1 === tmp0_other_with_cast.au4_1))
      return false;
    if (!(this.bu4_1 == tmp0_other_with_cast.bu4_1))
      return false;
    if (!(this.cu4_1 == tmp0_other_with_cast.cu4_1))
      return false;
    if (!(this.du4_1 == tmp0_other_with_cast.du4_1))
      return false;
    if (!(this.eu4_1 == tmp0_other_with_cast.eu4_1))
      return false;
    if (!(this.fu4_1 === tmp0_other_with_cast.fu4_1))
      return false;
    if (!(this.gu4_1 == tmp0_other_with_cast.gu4_1))
      return false;
    if (!(this.hu4_1 === tmp0_other_with_cast.hu4_1))
      return false;
    return true;
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.lx6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).nx6 = function (it, $completion) {
    var tmp = this.ox6(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.nx6((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.lx6_1.lx7_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.px7(this.mx6_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).ox6 = function (it, completion) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this.lx6_1, completion);
    i.mx6_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.nx6(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.yx7_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.yx7_1.fqq().p7d().gcl(this.yx7_1.dqp_1);
            var tmp_1 = TextBlockDetailViewModel$slambda$slambda$slambda$slambda_0(this.yx7_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.yx7_1, completion);
    i.zx7_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.nqp_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.vq8(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.ix8_1 = $this_launch;
    this.jx8_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.ix8_1, VOID, VOID, TextBlockDetailViewModel$slambda$slambda$slambda_0(this.jx8_1, null));
          launchSetTitleFromClazzUid(this.jx8_1, this.jx8_1.nx7_1, TextBlockDetailViewModel$slambda$slambda$lambda(this.jx8_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.ix8_1, this.jx8_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_160() {
    this.kx8_1 = 'CourseText';
  }
  var Companion_instance_209;
  function Companion_getInstance_177() {
    return Companion_instance_209;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_28(function_0) {
    this.lx8_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_28).t1d = function (value, $completion) {
    return this.lx8_1(value, $completion);
  };
  function TextBlockDetailViewModel$slambda(this$0, resultContinuation) {
    this.ux8_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.ux8_1.lx7_1, TextBlockDetailViewModel$slambda$slambda_0(this.vx8_1, this.ux8_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.ux8_1, completion);
    i.vx8_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.lx7_1 = MutableStateFlow(new TextBlockDetailUiState());
    this.mx7_1 = asStateFlow(this.lx7_1);
    var tmp = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.nx7_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this.aqq();
    launch(tmp_0, VOID, VOID, TextBlockDetailViewModel$slambda_0(this, null));
  }
  function TextBlockDetailUiState(courseBlock) {
    courseBlock = courseBlock === VOID ? null : courseBlock;
    this.ox7_1 = courseBlock;
  }
  protoOf(TextBlockDetailUiState).px7 = function (courseBlock) {
    return new TextBlockDetailUiState(courseBlock);
  };
  protoOf(TextBlockDetailUiState).toString = function () {
    return 'TextBlockDetailUiState(courseBlock=' + this.ox7_1 + ')';
  };
  protoOf(TextBlockDetailUiState).hashCode = function () {
    return this.ox7_1 == null ? 0 : this.ox7_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.ox7_1, tmp0_other_with_cast.ox7_1))
      return false;
    return true;
  };
  function CourseGroupSetDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.vx9();
      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).gxa = function (entity, permissionPair, $completion) {
    var tmp = this.hxa(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.gxa(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.exa_1, this.fxa_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).hxa = function (entity, permissionPair, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.exa_1 = entity;
    i.fxa_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.gxa(entity, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.qxa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).sxa = function (it, $completion) {
    var tmp = this.txa(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.sxa(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.rxa_1.x6_1;
          var hasCourseViewPermission = tmp0_container.y6();
          var hasManageStudentPermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.qxa_1.sx9_1;
            while (true) {
              var prevValue = this_0.t2();
              var this_1 = this.rxa_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.wxa(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.qxa_1.nqp_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var tmp_1 = this.qxa_1.jqq().vol(strings_getInstance().amx_1);
              var tmp_2 = FabIcon_EDIT_getInstance();
              var nextValue_0 = prevValue_0.vq8(new FabUiState(hasManageStudentPermission, tmp_1, tmp_2, CourseGroupSetDetailViewModel$onClickEdit$ref(this.qxa_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).txa = function (it, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this.qxa_1, completion);
    i.rxa_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.sxa(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).hxb = function (entity, permissionPair, $completion) {
    var tmp = this.ixb(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.hxb(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.fxb_1;
          var tmp_0;
          if (this.gxb_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).ixb = function (entity, permissionPair, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(completion);
    i.fxb_1 = entity;
    i.gxb_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.hxb(entity, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.rxb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).txb = function (courseGroupSet, $completion) {
    var tmp = this.uxb(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.txb((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.rxb_1.sx9_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.wxa(this.sxb_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.rxb_1.nqp_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver = this.sxb_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7z_1;
              var nextValue_0 = prevValue_0.vq8(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).uxb = function (courseGroupSet, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this.rxb_1, completion);
    i.sxb_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.txb(courseGroupSet, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda($memberListFlow, $permissionsFlow, this$0, resultContinuation) {
    this.dxc_1 = $memberListFlow;
    this.exc_1 = $permissionsFlow;
    this.fxc_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.dxc_1, this.exc_1, CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_0(null)));
            var tmp_1 = CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_2(this.fxc_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.dxc_1, this.exc_1, this.fxc_1, completion);
    i.gxc_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.pxc_1 = $entityFlow;
    this.qxc_1 = $permissionsFlow;
    this.rxc_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.pxc_1, this.qxc_1, CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_4(null));
            var tmp_1 = CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_6(this.rxc_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.pxc_1, this.qxc_1, this.rxc_1, completion);
    i.sxc_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.bxd_1 = $this_launch;
    this.cxd_1 = $memberListFlow;
    this.dxd_1 = $permissionsFlow;
    this.exd_1 = this$0;
    this.fxd_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.bxd_1, VOID, VOID, CourseGroupSetDetailViewModel$slambda$slambda$slambda_0(this.cxd_1, this.dxd_1, this.exd_1, null));
          launch(this.bxd_1, VOID, VOID, CourseGroupSetDetailViewModel$slambda$slambda$slambda_2(this.fxd_1, this.dxd_1, this.exd_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.bxd_1, this.cxd_1, this.dxd_1, this.exd_1, this.fxd_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_161() {
    this.gxd_1 = 'CourseGroupSet';
  }
  var Companion_instance_210;
  function Companion_getInstance_178() {
    return Companion_instance_210;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_29(function_0) {
    this.hxd_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_29).t1d = function (value, $completion) {
    return this.hxd_1(value, $completion);
  };
  function CourseGroupSetDetailViewModel$slambda(this$0, resultContinuation) {
    this.qxd_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.qxd_1.fqq().o7f();
            var tmp_2 = this.qxd_1.bqq();
            PermissionFlags_getInstance();
            var tmp_3 = new Long(1, 0);
            PermissionFlags_getInstance();
            tmp_0.sxd_1 = shareIn(tmp_1.gdk(tmp_2, this.qxd_1.ux9_1, tmp_3, new Long(8, 0)), this.qxd_1.aqq(), Companion_getInstance_12().v1h());
            this.txd_1 = this.qxd_1.fqq().s7d().td3(this.qxd_1.dqp_1, this.qxd_1.ux9_1, systemTimeInMillis(), 0, this.qxd_1.bqq());
            this.uxd_1 = this.qxd_1.fqq().r7d().t8c(this.qxd_1.dqp_1);
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.qxd_1.sx9_1, CourseGroupSetDetailViewModel$slambda$slambda_0(this.rxd_1, this.txd_1, this.sxd_1, this.qxd_1, this.uxd_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.qxd_1, completion);
    i.rxd_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.sx9_1 = MutableStateFlow(new CourseGroupSetDetailUiState());
    this.tx9_1 = asStateFlow(this.sx9_1);
    var tmp = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.ux9_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this.aqq();
    launch(tmp_0, VOID, VOID, CourseGroupSetDetailViewModel$slambda_0(this, null));
  }
  protoOf(CourseGroupSetDetailViewModel).vx9 = function () {
    Companion_getInstance_117();
    var tmp = to('entityUid', this.dqp_1.toString());
    Companion_getInstance_126();
    this.lqp_1.wp8('CourseGroupsEdit', mapOf([tmp, to('clazzUid', this.ux9_1.toString())]));
  };
  function CourseGroupSetDetailUiState(courseGroupSet, membersList) {
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    membersList = membersList === VOID ? emptyList() : membersList;
    this.uxa_1 = courseGroupSet;
    this.vxa_1 = membersList;
  }
  protoOf(CourseGroupSetDetailUiState).vxd = function (courseGroupSet, membersList) {
    return new CourseGroupSetDetailUiState(courseGroupSet, membersList);
  };
  protoOf(CourseGroupSetDetailUiState).wxa = function (courseGroupSet, membersList, $super) {
    courseGroupSet = courseGroupSet === VOID ? this.uxa_1 : courseGroupSet;
    membersList = membersList === VOID ? this.vxa_1 : membersList;
    return $super === VOID ? this.vxd(courseGroupSet, membersList) : $super.vxd.call(this, courseGroupSet, membersList);
  };
  protoOf(CourseGroupSetDetailUiState).toString = function () {
    return 'CourseGroupSetDetailUiState(courseGroupSet=' + this.uxa_1 + ', membersList=' + this.vxa_1 + ')';
  };
  protoOf(CourseGroupSetDetailUiState).hashCode = function () {
    var result = this.uxa_1 == null ? 0 : hashCode(this.uxa_1);
    result = imul(result, 31) + hashCode(this.vxa_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.uxa_1, tmp0_other_with_cast.uxa_1))
      return false;
    if (!equals(this.vxa_1, tmp0_other_with_cast.vxa_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.exe_1 = this$0;
    this.fxe_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).sxe = function (db, $completion) {
    var tmp = this.jo1(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.sxe(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.gxe_1.s7d().sd3(this.exe_1.rqv_1, this.exe_1.sxf_1, systemTimeInMillis(), 0, this.exe_1.bqq(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hxe_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.ixe_1 = this.hxe_1;
            var tmp_1 = this;
            tmp_1.jxe_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.hxe_1, 10));
            this.kxe_1 = this.ixe_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.kxe_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.lxe_1 = this.kxe_1.e();
            var tmp_2 = this;
            tmp_2.mxe_1 = this.lxe_1;
            if (this.mxe_1.hd5_1 == null) {
              var tmp_3 = this;
              tmp_3.oxe_1 = new CourseGroupMemberAndName();
              var tmp_4 = this;
              tmp_4.pxe_1 = this.oxe_1;
              this.pxe_1.id5_1 = this.mxe_1.id5_1;
              this.pxe_1.kd5_1 = this.mxe_1.kd5_1;
              this.pxe_1.jd5_1 = this.mxe_1.jd5_1;
              this.pxe_1.ld5_1 = this.mxe_1.ld5_1;
              var tmp_5 = this;
              tmp_5.qxe_1 = new CourseGroupMember();
              var tmp_6 = this;
              tmp_6.rxe_1 = this.qxe_1;
              this.hd_1 = 3;
              var tmp_7 = get_doorPrimaryKeyManager(this.exe_1.dqq());
              suspendResult = tmp_7.o62(243, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_8 = this;
              tmp_8.nxe_1 = this.mxe_1;
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            var ARGUMENT = suspendResult;
            this.rxe_1.pd4_1 = ARGUMENT;
            this.rxe_1.qd4_1 = this.fxe_1;
            this.rxe_1.sd4_1 = this.mxe_1.jd5_1;
            var ARGUMENT_0 = this.qxe_1;
            this.pxe_1.hd5_1 = ARGUMENT_0;
            this.nxe_1 = this.oxe_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var ARGUMENT_1 = this.nxe_1;
            this.jxe_1.i1(ARGUMENT_1);
            this.hd_1 = 2;
            continue $sm;
          case 5:
            return this.jxe_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).jo1 = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda(this.exe_1, this.fxe_1, completion);
    i.gxe_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.sxe(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).bxg = 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.bxg($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.bxg($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.qxf_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.hxg(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.qxg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).uxg = function (db, $completion) {
    var tmp = this.jo1(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.uxg(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.rxg_1;
            var tmp_1;
            if (!this.qxg_1.rqv_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            var tmp0_safe_receiver = tmp_1;
            tmp_0.sxg_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.r7d();
            if (this.sxg_1 == null) {
              this.txg_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.sxg_1.pdc(this.qxg_1.rqv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.txg_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.txg_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).jo1 = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this.qxg_1, completion);
    i.rxg_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.uxg(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_5($courseGroupSetUid, this$0, resultContinuation) {
    this.dxh_1 = $courseGroupSetUid;
    this.exh_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.dxh_1;
          this_0.e7z_1 = this.exh_1.sxf_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.dxh_1, this.exh_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.qxf_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.hxg(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation) {
    this.nxh_1 = this$0;
    this.oxh_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).qxh = 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.qxh((!(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.nxh_1, this.oxh_1, null);
            var tmp_3 = CourseGroupSetEditViewModel$slambda$slambda$slambda_2(null);
            suspendResult = this.nxh_1.tqq(tmp_0, tmp_1, VOID, tmp_2, tmp_3, CourseGroupSetEditViewModel$slambda$slambda$lambda(this.nxh_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.nxh_1, this.oxh_1, completion);
    i.pxh_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.qxh($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda_1(this$0, $courseGroupSetUid, resultContinuation) {
    this.zxh_1 = this$0;
    this.axi_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).cxi = 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.cxi((!(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.zxh_1, null);
            var tmp_2 = CourseGroupSetEditViewModel$slambda$slambda$slambda_6(this.axi_1, this.zxh_1, null);
            suspendResult = this.zxh_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, CourseGroupSetEditViewModel$slambda$slambda$lambda_0(this.zxh_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.zxh_1, this.axi_1, completion);
    i.bxi_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.cxi($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    this.lxi_1 = this$0;
    this.mxi_1 = $courseGroupSet;
    this.nxi_1 = $membersToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(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.io1(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.lxi_1.fqq().r7d().qdc(this.mxi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.lxi_1.fqq().s7d().ud3(this.nxi_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).jo1 = function (it, completion) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this.lxi_1, this.mxi_1, this.nxi_1, completion);
    i.oxi_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_162() {
    this.pxi_1 = 'CourseGroupsEdit';
    this.qxi_1 = 'courseGroupMembers';
  }
  var Companion_instance_211;
  function Companion_getInstance_179() {
    return Companion_instance_211;
  }
  function CourseGroupSetEditViewModel$slambda(this$0, resultContinuation) {
    this.zxi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda).hsg = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda).he = function (p1, $completion) {
    return this.hsg(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.axj_1.o7f();
            var tmp_1 = this.zxi_1.bqq();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.jdk(tmp_1, this.zxi_1.sxf_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).jo1 = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda(this.zxi_1, completion);
    i.axj_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.hsg(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda_1(this$0, resultContinuation) {
    this.jxj_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.jxj_1.rqv_1.equals(new Long(0, 0))) {
              this.lxj_1 = this.jxj_1.rqv_1;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = get_doorPrimaryKeyManager(this.jxj_1.dqq());
              suspendResult = tmp_0.o62(242, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

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

            continue $sm;
          case 3:
            l$ret$1: do {
              var this_0 = this.jxj_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_2 = this.jxj_1.jqq().vol(strings_getInstance().on4_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_2, true, CourseGroupSetEditViewModel$onClickSave$ref(this.jxj_1));
                var tmp1_loadingState = Companion_getInstance_98().dq9_1;
                var nextValue = prevValue.vq8(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.jxj_1.qxf_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.hxg(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.jxj_1, completion);
    i.kxj_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.vxj_1 = $commitDelay;
    this.wxj_1 = $entity;
    this.xxj_1 = $this;
    this.yxj_1 = $key;
    this.zxj_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.vxj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.wxj_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.xxj_1.pqq(this.xxj_1.jqp_1, this.yxj_1, this.zxj_1, this.wxj_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.vxj_1, this.wxj_1, this.xxj_1, this.yxj_1, this.zxj_1, completion);
    i.axk_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.jxk_1 = this$0;
    this.kxk_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.jxk_1.pqq(this.jxk_1.jqp_1, 'courseGroupMembers', ListSerializer(Companion_instance_43.n4r()), this.kxk_1.dxg_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.jxk_1, this.kxk_1, completion);
    i.lxk_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.uxk_1 = this$0;
    this.vxk_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.uxk_1.pqq(this.uxk_1.jqp_1, 'courseGroupMembers', ListSerializer(Companion_instance_43.n4r()), this.vxk_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.uxk_1, this.vxk_1, completion);
    i.wxk_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.fxl_1 = this$0;
    this.gxl_1 = $courseGroupSet;
    this.hxl_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.fxl_1.fqq();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, CourseGroupSetEditViewModel$onClickSave$slambda$slambda_0(this.fxl_1, this.gxl_1, this.hxl_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this.gxl_1.a7z_1;
            Companion_getInstance_126();
            this.fxl_1.sqv('CourseGroupSet', tmp_1, this.gxl_1, mapOf_0(to('clazzUid', this.fxl_1.sxf_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.fxl_1, this.gxl_1, this.hxl_1, completion);
    i.ixl_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.qxf_1 = MutableStateFlow(new CourseGroupSetEditUiState());
    this.rxf_1 = asStateFlow(this.qxf_1);
    var tmp = this;
    Companion_getInstance_117();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.sxf_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.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>' call
        var tmp0_title = this.tqw(strings_getInstance().unj_1, strings_getInstance().vnj_1);
        var tmp1_loadingState = Companion_getInstance_98().cq9_1;
        var nextValue = prevValue.vq8(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.vqq(tmp_0, VOID, VOID, CourseGroupSetEditViewModel$slambda_2(this, null));
  }
  protoOf(CourseGroupSetEditViewModel).jxl = function (courseGroupSet) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.qxf_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.cxg_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7z_1;
        var tmp_0 = this.uqw(tmp, courseGroupSet == null ? null : courseGroupSet.b7z_1, prevValue.exg_1);
        var tmp2_safe_receiver = prevValue.cxg_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.c7z_1;
        var nextValue = prevValue.hxg(courseGroupSet, VOID, tmp_0, this.uqw(tmp_1, courseGroupSet == null ? null : courseGroupSet.c7z_1, prevValue.fxg_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_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.aqq();
    tmp_2.qqv_1 = launch(tmp_3, VOID, VOID, CourseGroupSetEditViewModel$onEntityChanged$slambda_0(commitDelay, courseGroupSet, this, key, serializer, null));
  };
  protoOf(CourseGroupSetEditViewModel).kxl = function (personUid, groupNumber) {
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.qxf_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.dxg_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.xkn(tmp);
        var nextValue = prevValue.hxg(VOID, replace_0(prevValue.dxg_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.aqq();
    launch(tmp_1, VOID, VOID, CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda_0(this, newState, null));
  };
  protoOf(CourseGroupSetEditViewModel).lxl = function () {
    var tmp0_safe_receiver = this.qxf_1.t2().cxg_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.qxf_1.t2().dxg_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.qxf_1.t2().dxg_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.xkn(tmp);
      destination_0.i1(tmp$ret$3);
    }
    var newMemberList = destination_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.qxf_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
        var nextValue = prevValue.hxg(VOID, newMemberList);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.aqq();
    launch(tmp_0, VOID, VOID, CourseGroupSetEditViewModel$onClickAssignRandomly$slambda_0(this, newMemberList, null));
  };
  protoOf(CourseGroupSetEditViewModel).vsd = function () {
    var tmp0_elvis_lhs = this.qxf_1.t2().cxg_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.qxf_1.t2().dxg_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.hqq().kq9(new Snack(this.jqq().vol(strings_getInstance().xmj_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.qxf_1;
        while (true) {
          var prevValue = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.hxg(VOID, VOID, this.jqq().vol(strings_getInstance().cmp_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.qxf_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.hxg(VOID, VOID, VOID, this.jqq().vol(strings_getInstance().hni_1));
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_2;
          }
        }
      }
    }
    if ((hasInvalidAssignments ? true : !(this.qxf_1.t2().fxg_1 == null)) ? true : !(this.qxf_1.t2().exg_1 == null)) {
      return Unit_instance;
    }
    var tmp_1 = this.aqq();
    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.cxg_1 = courseGroupSet;
    this.dxg_1 = membersList;
    this.exg_1 = courseTitleError;
    this.fxg_1 = numOfGroupsError;
    this.gxg_1 = fieldsEnabled;
  }
  protoOf(CourseGroupSetEditUiState).mxl = function (courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) {
    return new CourseGroupSetEditUiState(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled);
  };
  protoOf(CourseGroupSetEditUiState).hxg = function (courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled, $super) {
    courseGroupSet = courseGroupSet === VOID ? this.cxg_1 : courseGroupSet;
    membersList = membersList === VOID ? this.dxg_1 : membersList;
    courseTitleError = courseTitleError === VOID ? this.exg_1 : courseTitleError;
    numOfGroupsError = numOfGroupsError === VOID ? this.fxg_1 : numOfGroupsError;
    fieldsEnabled = fieldsEnabled === VOID ? this.gxg_1 : fieldsEnabled;
    return $super === VOID ? this.mxl(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) : $super.mxl.call(this, courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled);
  };
  protoOf(CourseGroupSetEditUiState).toString = function () {
    return 'CourseGroupSetEditUiState(courseGroupSet=' + this.cxg_1 + ', membersList=' + this.dxg_1 + ', courseTitleError=' + this.exg_1 + ', numOfGroupsError=' + this.fxg_1 + ', fieldsEnabled=' + this.gxg_1 + ')';
  };
  protoOf(CourseGroupSetEditUiState).hashCode = function () {
    var result = this.cxg_1 == null ? 0 : hashCode(this.cxg_1);
    result = imul(result, 31) + hashCode(this.dxg_1) | 0;
    result = imul(result, 31) + (this.exg_1 == null ? 0 : getStringHashCode(this.exg_1)) | 0;
    result = imul(result, 31) + (this.fxg_1 == null ? 0 : getStringHashCode(this.fxg_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gxg_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.cxg_1, tmp0_other_with_cast.cxg_1))
      return false;
    if (!equals(this.dxg_1, tmp0_other_with_cast.dxg_1))
      return false;
    if (!(this.exg_1 == tmp0_other_with_cast.exg_1))
      return false;
    if (!(this.fxg_1 == tmp0_other_with_cast.fxg_1))
      return false;
    if (!(this.gxg_1 === tmp0_other_with_cast.gxg_1))
      return false;
    return true;
  };
  function CourseGroupSetListViewModel$slambda$lambda(this$0) {
    return function () {
      var tmp = this$0.fqq().o7f();
      var tmp_0 = this$0.bqq();
      PermissionFlags_getInstance();
      return tmp.fdk(tmp_0, this$0.nxm_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.eqy_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.txm(visible);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.cxn_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.cxn_1.nxm_1, this.cxn_1.dqq(), this.cxn_1.nqp_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.cxn_1, completion);
    i.dxn_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.mxn_1 = $this_launch;
    this.nxn_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.mxn_1, VOID, VOID, CourseGroupSetListViewModel$slambda$slambda$slambda_0(this.nxn_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.mxn_1, this.nxn_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_163() {
    this.oxn_1 = 'CourseGroups';
  }
  var Companion_instance_212;
  function Companion_getInstance_180() {
    return Companion_instance_212;
  }
  function CourseGroupSetListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().r7d().odc(this$0.nxm_1, toQueryLikeParam(this$0.nqp_1.t2().nq8_1.cq8_1), this$0.eqy_1.t2().sxm_1.cqf_1);
    };
  }
  function CourseGroupSetListViewModel$slambda(this$0, resultContinuation) {
    this.xxn_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.xxn_1);
            var tmp_1 = strings_getInstance().en2_1;
            suspendResult = this.xxn_1.oqz(tmp_0, tmp_1, CourseGroupSetListViewModel$slambda$lambda_0(this.xxn_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.xxn_1, completion);
    i.yxn_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.hxo_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.hxo_1.eqy_1, CourseGroupSetListViewModel$slambda$slambda_0(this.ixo_1, this.hxo_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.hxo_1, completion);
    i.ixo_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_117();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.nxm_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    tmp_0.oxm_1 = CourseGroupSetListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>' call
        var nextValue = prevValue.txm(VOID, this.oxm_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nqp_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.vq8(VOID, VOID, VOID, true, VOID, VOID, VOID, this.nqz());
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_1 = this.aqq();
    launch(tmp_1, VOID, VOID, CourseGroupSetListViewModel$slambda_0(this, null));
    var tmp_2 = this.aqq();
    launch(tmp_2, VOID, VOID, CourseGroupSetListViewModel$slambda_2(this, null));
  }
  protoOf(CourseGroupSetListViewModel).yqy = function (searchText) {
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(CourseGroupSetListViewModel).jxo = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.onSortOptionChanged.<anonymous>' call
        var nextValue = prevValue.txm(VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(CourseGroupSetListViewModel).zqy = function () {
    Companion_getInstance_117();
    this.rqz('CourseGroupsEdit', mapOf_0(to('clazzUid', this.nxm_1.toString())));
  };
  protoOf(CourseGroupSetListViewModel).kxo = function (entry) {
    var tmp = entry.a7z_1;
    Companion_getInstance_126();
    this.tqz('CourseGroupSet', tmp, entry, mapOf_0(to('clazzUid', this.nxm_1.toString())));
  };
  function Companion_164() {
    Companion_instance_213 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().wml_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().wml_1;
    tmp.lxo_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 2, false)]);
  }
  var Companion_instance_213;
  function Companion_getInstance_181() {
    if (Companion_instance_213 == null)
      new Companion_164();
    return Companion_instance_213;
  }
  function CourseGroupSetListUiState$_init_$lambda_2d65m2() {
    return new EmptyPagingSource();
  }
  function CourseGroupSetListUiState(showAddItem, courseGroupSets, sortOptions, sortOption) {
    Companion_getInstance_181();
    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_181().lxo_1 : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    this.pxm_1 = showAddItem;
    this.qxm_1 = courseGroupSets;
    this.rxm_1 = sortOptions;
    this.sxm_1 = sortOption;
  }
  protoOf(CourseGroupSetListUiState).mxo = function (showAddItem, courseGroupSets, sortOptions, sortOption) {
    return new CourseGroupSetListUiState(showAddItem, courseGroupSets, sortOptions, sortOption);
  };
  protoOf(CourseGroupSetListUiState).txm = function (showAddItem, courseGroupSets, sortOptions, sortOption, $super) {
    showAddItem = showAddItem === VOID ? this.pxm_1 : showAddItem;
    courseGroupSets = courseGroupSets === VOID ? this.qxm_1 : courseGroupSets;
    sortOptions = sortOptions === VOID ? this.rxm_1 : sortOptions;
    sortOption = sortOption === VOID ? this.sxm_1 : sortOption;
    return $super === VOID ? this.mxo(showAddItem, courseGroupSets, sortOptions, sortOption) : $super.mxo.call(this, showAddItem, courseGroupSets, sortOptions, sortOption);
  };
  protoOf(CourseGroupSetListUiState).toString = function () {
    return 'CourseGroupSetListUiState(showAddItem=' + this.pxm_1 + ', courseGroupSets=' + this.qxm_1 + ', sortOptions=' + this.rxm_1 + ', sortOption=' + this.sxm_1 + ')';
  };
  protoOf(CourseGroupSetListUiState).hashCode = function () {
    var result = getBooleanHashCode(this.pxm_1);
    result = imul(result, 31) + hashCode(this.qxm_1) | 0;
    result = imul(result, 31) + hashCode(this.rxm_1) | 0;
    result = imul(result, 31) + this.sxm_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.pxm_1 === tmp0_other_with_cast.pxm_1))
      return false;
    if (!equals(this.qxm_1, tmp0_other_with_cast.qxm_1))
      return false;
    if (!equals(this.rxm_1, tmp0_other_with_cast.rxm_1))
      return false;
    if (!this.sxm_1.equals(tmp0_other_with_cast.sxm_1))
      return false;
    return true;
  };
  function CourseTerminologyEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.vxo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).trk = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.trk(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.wxo_1.q7d();
            var tmp_1;
            if (!this.vxo_1.rqv_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.xxo_1 = tmp_1;
            if (this.xxo_1 == null) {
              this.yxo_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.xxo_1.ge7(this.vxo_1.rqv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.yxo_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.yxo_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).jo1 = function (it, completion) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda(this.vxo_1, completion);
    i.wxo_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.trk(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.hxp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).kxp = 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.kxp($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.ixp_1 = new CourseTerminology();
            var tmp_1 = this;
            tmp_1.jxp_1 = this.ixp_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.hxp_1.dqq());
            suspendResult = tmp_2.o62(450, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.jxp_1.m8g_1 = ARGUMENT;
            return this.ixp_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.hxp_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.kxp($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.ixq_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.oxq(VOID, terminology, VOID, toTerminologyEntries(terminology, this$0.m4r(), this$0.jqq()));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseTerminologyEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_165() {
    this.pxq_1 = 'CourseTerminologyEdit';
  }
  var Companion_instance_214;
  function Companion_getInstance_182() {
    return Companion_instance_214;
  }
  function CourseTerminologyEditViewModel$slambda(this$0, resultContinuation) {
    this.yxq_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.axr_1 = Companion_instance_34.n4r();
            this.hd_1 = 1;
            var tmp_0 = CourseTerminologyEditViewModel$slambda$slambda_0(this.yxq_1, null);
            var tmp_1 = CourseTerminologyEditViewModel$slambda$slambda_2(this.yxq_1, null);
            suspendResult = this.yxq_1.tqq(this.axr_1, VOID, VOID, tmp_0, tmp_1, CourseTerminologyEditViewModel$slambda$lambda(this.yxq_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.yxq_1.ixq_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.oxq(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.yxq_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_2 = this.yxq_1.jqq().vol(strings_getInstance().on4_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_2, VOID, CourseTerminologyEditViewModel$onClickSave$ref(this.yxq_1));
                var tmp1_loadingState = Companion_getInstance_98().dq9_1;
                var nextValue_0 = prevValue_0.vq8(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.yxq_1, completion);
    i.zxq_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.jxr_1 = $commitDelay;
    this.kxr_1 = $entity;
    this.lxr_1 = $this;
    this.mxr_1 = $key;
    this.nxr_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.jxr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.kxr_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.lxr_1.pqq(this.lxr_1.jqp_1, this.mxr_1, this.nxr_1, this.kxr_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.jxr_1, this.kxr_1, this.lxr_1, this.mxr_1, this.nxr_1, completion);
    i.oxr_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.zqa_1.equals($terminologyEntry.zqa_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.xxr_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.xxr_1.ixq_1.t2().lxq_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.zxr_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.xxr_1.fqq().q7d().he7(this.zxr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.xxr_1.ixq_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.oxq(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.xxr_1.uqv(this.zxr_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.xxr_1, completion);
    i.yxr_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.ixq_1 = MutableStateFlow(new CourseTerminologyEditUiState());
    this.jxq_1 = asStateFlow(this.ixq_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.<anonymous>' call
        var tmp0_title = this.tqw(strings_getInstance().onj_1, strings_getInstance().pnj_1);
        var tmp1_loadingState = Companion_getInstance_98().cq9_1;
        var nextValue = prevValue.vq8(VOID, tmp1_loadingState, tmp0_title);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, CourseTerminologyEditViewModel$slambda_0(this, null));
  }
  protoOf(CourseTerminologyEditViewModel).axs = function (courseTerminology) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ixq_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.oxq(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_126();
    var key = 'entityState';
    var tmp0_safe_receiver = this.qqv_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.aqq();
    tmp.qqv_1 = launch(tmp_0, VOID, VOID, CourseTerminologyEditViewModel$onEntityChanged$slambda_0(commitDelay, courseTerminology, this, key, serializer, null));
  };
  protoOf(CourseTerminologyEditViewModel).bxs = function (terminologyEntry) {
    var tmp = this.ixq_1.t2().nxq_1;
    var newTermList = replace_0(tmp, terminologyEntry, CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda(terminologyEntry));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ixq_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onTerminologyTermChanged.<anonymous>' call
        var nextValue = prevValue.oxq(VOID, VOID, VOID, newTermList);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this.ixq_1.t2().lxq_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.axs(tmp_0);
  };
  protoOf(CourseTerminologyEditViewModel).vsd = function () {
    if (!this.ixq_1.t2().mxq_1)
      return Unit_instance;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ixq_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.oxq(VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.aqq();
    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.kxq_1 = titleError;
    this.lxq_1 = entity;
    this.mxq_1 = fieldsEnabled;
    this.nxq_1 = terminologyTermList;
  }
  protoOf(CourseTerminologyEditUiState).cxs = function (titleError, entity, fieldsEnabled, terminologyTermList) {
    return new CourseTerminologyEditUiState(titleError, entity, fieldsEnabled, terminologyTermList);
  };
  protoOf(CourseTerminologyEditUiState).oxq = function (titleError, entity, fieldsEnabled, terminologyTermList, $super) {
    titleError = titleError === VOID ? this.kxq_1 : titleError;
    entity = entity === VOID ? this.lxq_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.mxq_1 : fieldsEnabled;
    terminologyTermList = terminologyTermList === VOID ? this.nxq_1 : terminologyTermList;
    return $super === VOID ? this.cxs(titleError, entity, fieldsEnabled, terminologyTermList) : $super.cxs.call(this, titleError, entity, fieldsEnabled, terminologyTermList);
  };
  protoOf(CourseTerminologyEditUiState).toString = function () {
    return 'CourseTerminologyEditUiState(titleError=' + this.kxq_1 + ', entity=' + this.lxq_1 + ', fieldsEnabled=' + this.mxq_1 + ', terminologyTermList=' + this.nxq_1 + ')';
  };
  protoOf(CourseTerminologyEditUiState).hashCode = function () {
    var result = this.kxq_1 == null ? 0 : getStringHashCode(this.kxq_1);
    result = imul(result, 31) + (this.lxq_1 == null ? 0 : hashCode(this.lxq_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mxq_1) | 0;
    result = imul(result, 31) + hashCode(this.nxq_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.kxq_1 == tmp0_other_with_cast.kxq_1))
      return false;
    if (!equals(this.lxq_1, tmp0_other_with_cast.lxq_1))
      return false;
    if (!(this.mxq_1 === tmp0_other_with_cast.mxq_1))
      return false;
    if (!equals(this.nxq_1, tmp0_other_with_cast.nxq_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.eqy_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.fxs(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_166() {
    this.gxs_1 = 'CourseTerminologyList';
  }
  var Companion_instance_215;
  function Companion_getInstance_183() {
    return Companion_instance_215;
  }
  function CourseTerminologyListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().q7d().de7();
    };
  }
  function CourseTerminologyListViewModel$slambda(this$0, resultContinuation) {
    this.pxs_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().mnj_1;
            suspendResult = this.pxs_1.oqz(tmp_0, tmp_1, CourseTerminologyListViewModel$slambda$lambda_0(this.pxs_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.pxs_1, completion);
    i.qxs_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.rxt_1 = CourseTerminologyListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, this.vqz(strings_getInstance().mnj_1, strings_getInstance().nnj_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqy_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.fxs(this.rxt_1);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_0 = this.aqq();
    launch(tmp_0, VOID, VOID, CourseTerminologyListViewModel$slambda_0(this, null));
  }
  protoOf(CourseTerminologyListViewModel).zqy = function () {
    this.sqz('CourseTerminologyEdit');
  };
  protoOf(CourseTerminologyListViewModel).sxt = function (entry) {
    this.uqz('CourseTerminologyEdit', entry.m8g_1, entry);
  };
  protoOf(CourseTerminologyListViewModel).yqy = 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.dxs_1 = terminologyList;
    this.exs_1 = showAddItemInList;
  }
  protoOf(CourseTerminologyListUiState).txt = function (terminologyList, showAddItemInList) {
    return new CourseTerminologyListUiState(terminologyList, showAddItemInList);
  };
  protoOf(CourseTerminologyListUiState).fxs = function (terminologyList, showAddItemInList, $super) {
    terminologyList = terminologyList === VOID ? this.dxs_1 : terminologyList;
    showAddItemInList = showAddItemInList === VOID ? this.exs_1 : showAddItemInList;
    return $super === VOID ? this.txt(terminologyList, showAddItemInList) : $super.txt.call(this, terminologyList, showAddItemInList);
  };
  protoOf(CourseTerminologyListUiState).toString = function () {
    return 'CourseTerminologyListUiState(terminologyList=' + this.dxs_1 + ', showAddItemInList=' + this.exs_1 + ')';
  };
  protoOf(CourseTerminologyListUiState).hashCode = function () {
    var result = hashCode(this.dxs_1);
    result = imul(result, 31) + getBooleanHashCode(this.exs_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.dxs_1, tmp0_other_with_cast.dxs_1))
      return false;
    if (!(this.exs_1 === tmp0_other_with_cast.exs_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().one_1;
    } else {
      var tmp_2 = _this__u8e3s4.keg_1;
      if (tmp_2 === 7) {
        tmp = strings_getInstance().pn5_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function _get_restoreDeletedItemUseCase__7lscig($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vxu_1;
    restoreDeletedItemUseCase$factory_0();
    return this_0.t2();
  }
  function _get_deletePermanentlyUseCase__wdw610($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wxu_1;
    deletePermanentlyUseCase$factory_0();
    return this_0.t2();
  }
  function restoreItems($this, items) {
    var tmp = $this.aqq();
    launch(tmp, VOID, VOID, DeletedItemListViewModel$restoreItems$slambda_0($this, items, null));
  }
  function Companion_167() {
    this.xxu_1 = 'DeletedItems';
  }
  var Companion_instance_216;
  function Companion_getInstance_184() {
    return Companion_instance_216;
  }
  function DeletedItemListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().m7f().deg(this$0.bqq(), false);
    };
  }
  function DeletedItemListViewModel$onConfirmDeletePermanently$slambda(this$0, $itemsToDelete, resultContinuation) {
    this.gxv_1 = this$0;
    this.hxv_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.gxv_1).dpf(this.hxv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.gxv_1.hqq().kq9(new Snack(this.gxv_1.jqq().awu(plurals_getInstance().gnu_1, this.hxv_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.gxv_1.hqq().kq9(new Snack(this.gxv_1.jqq().vol(strings_getInstance().xmj_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.gxv_1, this.hxv_1, completion);
    i.ixv_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.rxv_1 = this$0;
    this.sxv_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.rxv_1).dpf(this.sxv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.rxv_1.hqq().kq9(new Snack(this.rxv_1.jqq().awu(plurals_getInstance().hnu_1, this.sxv_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.rxv_1, this.sxv_1, completion);
    i.txv_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.uxu_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.vxu_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.wxu_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.eqy_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.<anonymous>' call
        var nextValue = prevValue.yxv(this.uxu_1);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.nqp_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.vq8(VOID, VOID, this.jqq().vol(strings_getInstance().nno_1));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(DeletedItemListViewModel).yqy = function (searchText) {
  };
  protoOf(DeletedItemListViewModel).zxv = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onDismissConfirmDialog.<anonymous>' call
        var nextValue = prevValue.yxv(VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(DeletedItemListViewModel).axw = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.getAndUpdate' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onConfirmDeletePermanently.<anonymous>' call
        var nextValue = prevValue.yxv(VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = prevValue;
          break $l$block;
        }
      }
    }
    var itemsToDelete = tmp$ret$1.xxv_1;
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, DeletedItemListViewModel$onConfirmDeletePermanently$slambda_0(this, itemsToDelete, null));
  };
  protoOf(DeletedItemListViewModel).bxw = function (item) {
    restoreItems(this, listOf_0(item));
  };
  protoOf(DeletedItemListViewModel).cxw = function (item) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_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.jqq().awu(plurals_getInstance().inu_1, 1);
        var nextValue = prevValue.yxv(VOID, true, tmp1_deleteConfirmText, tmp0_itemsToConfirmDeletion);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(DeletedItemListViewModel).zqy = 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.uxv_1 = deletedItemsList;
    this.vxv_1 = confirmDialogVisible;
    this.wxv_1 = deleteConfirmText;
    this.xxv_1 = itemsToConfirmDeletion;
  }
  protoOf(DeletedItemListUiState).dxw = function (deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) {
    return new DeletedItemListUiState(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion);
  };
  protoOf(DeletedItemListUiState).yxv = function (deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion, $super) {
    deletedItemsList = deletedItemsList === VOID ? this.uxv_1 : deletedItemsList;
    confirmDialogVisible = confirmDialogVisible === VOID ? this.vxv_1 : confirmDialogVisible;
    deleteConfirmText = deleteConfirmText === VOID ? this.wxv_1 : deleteConfirmText;
    itemsToConfirmDeletion = itemsToConfirmDeletion === VOID ? this.xxv_1 : itemsToConfirmDeletion;
    return $super === VOID ? this.dxw(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) : $super.dxw.call(this, deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion);
  };
  protoOf(DeletedItemListUiState).toString = function () {
    return 'DeletedItemListUiState(deletedItemsList=' + this.uxv_1 + ', confirmDialogVisible=' + this.vxv_1 + ', deleteConfirmText=' + this.wxv_1 + ', itemsToConfirmDeletion=' + this.xxv_1 + ')';
  };
  protoOf(DeletedItemListUiState).hashCode = function () {
    var result = hashCode(this.uxv_1);
    result = imul(result, 31) + getBooleanHashCode(this.vxv_1) | 0;
    result = imul(result, 31) + (this.wxv_1 == null ? 0 : getStringHashCode(this.wxv_1)) | 0;
    result = imul(result, 31) + hashCode(this.xxv_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.uxv_1, tmp0_other_with_cast.uxv_1))
      return false;
    if (!(this.vxv_1 === tmp0_other_with_cast.vxv_1))
      return false;
    if (!(this.wxv_1 == tmp0_other_with_cast.wxv_1))
      return false;
    if (!equals(this.xxv_1, tmp0_other_with_cast.xxv_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.zqy();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.pxx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).nx6 = function (it, $completion) {
    var tmp = this.ox6(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.nx6((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.pxx_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.wxx(this.qxx_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).ox6 = function (it, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this.pxx_1, completion);
    i.qxx_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.nx6(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.fxy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).htb = function (permissionPair, $completion) {
    var tmp = this.itb(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.htb(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.hxy_1 = this.gxy_1;
            this.ixy_1 = this.hxy_1.y6();
            this.jxy_1 = this.hxy_1.z6();
            if (this.ixy_1) {
              l$ret$1: do {
                var this_0 = this.fxy_1.nqp_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_0 = this.fxy_1.jqq().vol(strings_getInstance().cnl_1);
                  var tmp_1 = FabIcon_ADD_getInstance();
                  var nextValue = prevValue.vq8(new FabUiState(true, tmp_0, tmp_1, CourseDiscussionDetailViewModel$onClickAdd$ref(this.fxy_1)));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              l$ret$3: do {
                var this_1 = this.fxy_1.eqy_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.wxx(VOID, this.fxy_1.gxx_1, this.jxy_1, VOID, this.fxy_1.jqq().qq7());
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 1;
              var tmp_2 = this.fxy_1.fqq().p7d().gcl(this.fxy_1.exx_1);
              var tmp_3 = CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda_0(this.fxy_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.fxy_1.nqp_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.vq8(new FabUiState());
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
              l$ret$7: do {
                var this_3 = this.fxy_1.eqy_1;
                while (true) {
                  var prevValue_2 = this_3.t2();
                  var nextValue_2 = prevValue_2.wxx(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).itb = function (permissionPair, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda(this.fxy_1, completion);
    i.gxy_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.htb(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda(this$0, resultContinuation) {
    this.sxy_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.sxy_1.fqq().o7f();
            var tmp_1 = this.sxy_1.bqq();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.gdk(tmp_1, this.sxy_1.fxx_1, tmp_2, new Long(4, 0)));
            suspendResult = collectLatest(tmp_3, CourseDiscussionDetailViewModel$slambda$slambda$slambda_0(this.sxy_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.sxy_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_168() {
    this.txy_1 = 'CourseDiscussion';
  }
  var Companion_instance_217;
  function Companion_getInstance_185() {
    return Companion_instance_217;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_30(function_0) {
    this.uxy_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_30).t1d = function (value, $completion) {
    return this.uxy_1(value, $completion);
  };
  function CourseDiscussionDetailViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().h7f().uel(this$0.exx_1, false);
    };
  }
  function CourseDiscussionDetailViewModel$slambda(this$0, resultContinuation) {
    this.dxz_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.dxz_1.eqy_1, CourseDiscussionDetailViewModel$slambda$slambda_0(this.dxz_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.dxz_1, completion);
    i.exz_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.nqp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.courediscussiondetail.CourseDiscussionDetailViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.vq8(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseDiscussionDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation) {
    this.nxz_1 = this$0;
    this.oxz_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.nxz_1.fqq().h7f().yel(this.oxz_1.nem_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.nxz_1.hqq().kq9(new Snack(this.nxz_1.jqq().vol(strings_getInstance().smk_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.nxz_1, this.oxz_1, completion);
    i.pxz_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_117();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.exx_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_126();
    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.fxx_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    tmp_1.gxx_1 = CourseDiscussionDetailViewModel$pagingSourceFactory$lambda(this);
    var tmp_2 = this.aqq();
    launch(tmp_2, VOID, VOID, CourseDiscussionDetailViewModel$slambda_0(this, null));
    launchSetTitleFromClazzUid(this, this.fxx_1, CourseDiscussionDetailViewModel$lambda(this));
  }
  protoOf(CourseDiscussionDetailViewModel).yqy = function (searchText) {
  };
  protoOf(CourseDiscussionDetailViewModel).zqy = function () {
    Companion_getInstance_126();
    var tmp = to('courseBlockUid', this.exx_1.toString());
    Companion_getInstance_126();
    this.rqz('DiscussionPostEdit', mapOf([tmp, to('clazzUid', this.fxx_1.toString())]));
  };
  protoOf(CourseDiscussionDetailViewModel).qxz = function (post) {
    Companion_getInstance_117();
    var tmp = to('entityUid', post.nem_1.toString());
    Companion_getInstance_126();
    this.lqp_1.wp8('CourseDiscussionPost', mapOf([tmp, to('clazzUid', this.fxx_1.toString())]));
  };
  protoOf(CourseDiscussionDetailViewModel).rxz = function (post) {
    var tmp = this.aqq();
    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.fmf(), Companion_getInstance_9().emj()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.rxx_1 = courseBlock;
    this.sxx_1 = posts;
    this.txx_1 = showModerateOptions;
    this.uxx_1 = localDateTimeNow;
    this.vxx_1 = dayOfWeekStrings;
  }
  protoOf(CourseDiscussionDetailUiState).sxz = function (courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    return new CourseDiscussionDetailUiState(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(CourseDiscussionDetailUiState).wxx = function (courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings, $super) {
    courseBlock = courseBlock === VOID ? this.rxx_1 : courseBlock;
    posts = posts === VOID ? this.sxx_1 : posts;
    showModerateOptions = showModerateOptions === VOID ? this.txx_1 : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? this.uxx_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.vxx_1 : dayOfWeekStrings;
    return $super === VOID ? this.sxz(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) : $super.sxz.call(this, courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(CourseDiscussionDetailUiState).toString = function () {
    return 'CourseDiscussionDetailUiState(courseBlock=' + this.rxx_1 + ', posts=' + this.sxx_1 + ', showModerateOptions=' + this.txx_1 + ', localDateTimeNow=' + this.uxx_1 + ', dayOfWeekStrings=' + this.vxx_1 + ')';
  };
  protoOf(CourseDiscussionDetailUiState).hashCode = function () {
    var result = this.rxx_1 == null ? 0 : this.rxx_1.hashCode();
    result = imul(result, 31) + hashCode(this.sxx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.txx_1) | 0;
    result = imul(result, 31) + this.uxx_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.vxx_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.rxx_1, tmp0_other_with_cast.rxx_1))
      return false;
    if (!equals(this.sxx_1, tmp0_other_with_cast.sxx_1))
      return false;
    if (!(this.txx_1 === tmp0_other_with_cast.txx_1))
      return false;
    if (!this.uxx_1.equals(tmp0_other_with_cast.uxx_1))
      return false;
    if (!equals(this.vxx_1, tmp0_other_with_cast.vxx_1))
      return false;
    return true;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.by0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).zqc = function (result, $completion) {
    var tmp = this.aqd(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.zqc(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.cy0_1.gqc_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.dy0_1 = tmp_2;
            this.hd_1 = 1;
            suspendResult = submitReply(this.by0_1, this.dy0_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).aqd = function (result, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this.by0_1, completion);
    i.cy0_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.zqc(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.my0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).wri = function (postTitle, $completion) {
    var tmp = this.xri(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.wri((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.my0_1.nqp_1;
          var tmp_0;
          if (!(this_0.t2().iq8_1 == this.ny0_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.vq8(VOID, VOID, this.ny0_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).xri = function (postTitle, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this.my0_1, completion);
    i.ny0_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.wri(postTitle, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.wy0_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.wy0_1.nqq(this.wy0_1.iqq(), 'replyTextResult');
            var tmp_1 = DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this.wy0_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.wy0_1, completion);
    i.xy0_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.gy1_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.gy1_1.fqq().h7f().z8c(this.gy1_1.dqp_1);
            var tmp_1 = DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this.gy1_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.gy1_1, completion);
    i.hy1_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.qy1_1 = this$0;
    this.ry1_1 = $savedStateHandle;
    this.sy1_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).htb = function (permissionPair, $completion) {
    var tmp = this.itb(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.htb(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.ty1_1;
          var hasViewPermission = tmp0_container.y6();
          var hasModeratePermission = tmp0_container.z6();
          if (hasViewPermission) {
            l$ret$1: do {
              var this_0 = this.qy1_1.ry2_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0 = this.qy1_1.bqq();
                var tmp_1 = this.qy1_1.zqp().eoc().znw_1.hks();
                var tmp0_safe_receiver = this.qy1_1.zqp().eoc().bnx_1;
                var nextValue = prevValue.fy3(this.qy1_1.qy2_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.ry1_1.ba('replyText');
            this.qy1_1.ty2_1.x1k(tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
            launch(this.sy1_1, VOID, VOID, DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_0(this.qy1_1, null));
            launch(this.sy1_1, VOID, VOID, DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_2(this.qy1_1, null));
          } else {
            l$ret$3: do {
              var this_1 = this.qy1_1.ry2_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_2 = DiscussionPostDetailViewModel$slambda$slambda$slambda$lambda;
                var tmp_3 = this.qy1_1.bqq();
                var tmp_4 = this.qy1_1.zqp().eoc().znw_1.hks();
                var tmp0_safe_receiver_0 = this.qy1_1.zqp().eoc().bnx_1;
                var nextValue_0 = prevValue_0.fy3(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.ry1_1.ba('replyText');
            this.qy1_1.ty2_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).itb = function (permissionPair, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda(this.qy1_1, this.ry1_1, this.sy1_1, completion);
    i.ty1_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.htb(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    this.oy3_1 = this$0;
    this.py3_1 = $savedStateHandle;
    this.qy3_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.oy3_1.fqq().o7f();
            var tmp_1 = this.oy3_1.bqq();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.gdk(tmp_1, this.oy3_1.wy2_1, tmp_2, new Long(4, 0)));
            suspendResult = collectLatest(tmp_3, DiscussionPostDetailViewModel$slambda$slambda$slambda_0(this.oy3_1, this.py3_1, this.qy3_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.oy3_1, this.py3_1, this.qy3_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$77($this, replyText, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_169() {
    this.hy4_1 = 'replyTextResult';
    this.iy4_1 = 'replyText';
    this.jy4_1 = 'CourseDiscussionPost';
  }
  var Companion_instance_218;
  function Companion_getInstance_186() {
    return Companion_instance_218;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_31(function_0) {
    this.ky4_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_31).t1d = function (value, $completion) {
    return this.ky4_1(value, $completion);
  };
  function DiscussionPostDetailViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().h7f().wel(this$0.dqp_1, false);
    };
  }
  function DiscussionPostDetailViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.ty4_1 = this$0;
    this.uy4_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.ty4_1.ry2_1, DiscussionPostDetailViewModel$slambda$slambda_0(this.ty4_1, this.uy4_1, this.vy4_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.ty4_1, this.uy4_1, completion);
    i.vy4_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.ey5_1 = this$0;
    this.fy5_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.ey5_1.jqp_1.mql('replyText', this.fy5_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.ey5_1, this.fy5_1, completion);
    i.gy5_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.py5_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.py5_1, this.py5_1.ty2_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.py5_1, completion);
    i.qy5_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.zy5_1 = this$0;
    this.ay6_1 = $replyText;
    this.by6_1 = $clazzAndBlockUids;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).he = function (p1, $completion) {
    return this.io1(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.zy5_1.fqq().h7f();
            var this_0 = new DiscussionPost();
            this_0.rem_1 = systemTimeInMillis();
            this_0.oem_1 = this.zy5_1.dqp_1;
            this_0.qem_1 = this.ay6_1;
            this_0.uem_1 = this.zy5_1.bqq();
            this_0.vem_1 = this.by6_1.sco_1;
            this_0.sem_1 = this.by6_1.tco_1;
            suspendResult = tmp_0.insertAsync(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zy5_1.dy6('');
            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).jo1 = function (it, completion) {
    var i = new DiscussionPostDetailViewModel$submitReply$slambda(this.zy5_1, this.ay6_1, this.by6_1, completion);
    i.cy6_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation) {
    this.my6_1 = this$0;
    this.ny6_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.my6_1.fqq().h7f().yel(this.ny6_1.nem_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.my6_1.hqq().kq9(new Snack(this.my6_1.jqq().vol(strings_getInstance().smk_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.my6_1, this.ny6_1, completion);
    i.oy6_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$77(_this__u8e3s4, replyText, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zy3_1 = _this__u8e3s4;
    this.ay4_1 = replyText;
  }
  protoOf($submitReplyCOROUTINE$77).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.zy3_1.ry2_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.fy3(VOID, VOID, VOID, VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.zy3_1.lqq(Companion_getInstance_98().cq9_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.zy3_1.dqq().p7d().lcl(this.zy3_1.dqp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.dy4_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.ey4_1 = this.dy4_1;
            if ((!(this.ey4_1 == null) ? !this.ey4_1.sco_1.equals(new Long(0, 0)) : false) ? !this.ey4_1.tco_1.equals(new Long(0, 0)) : false) {
              this.fy4_1 = this.ey4_1;
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.zy3_1.fqq().p7d().lcl(this.zy3_1.dqp_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.fy4_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.gy4_1 = this.fy4_1;
            if ((this.gy4_1 == null ? true : this.gy4_1.tco_1.equals(new Long(0, 0))) ? true : this.gy4_1.sco_1.equals(new Long(0, 0))) {
              this.zy3_1.hqq().kq9(new Snack(this.zy3_1.jqq().vol(strings_getInstance().xmj_1)));
              this.cy4_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.zy3_1.fqq();
            suspendResult = withDoorTransactionAsync(tmp_1, VOID, DiscussionPostDetailViewModel$submitReply$slambda_0(this.zy3_1, this.ay4_1, this.gy4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.by4_1 = suspendResult;
            this.id_1 = 11;
            this.hd_1 = 9;
            continue $sm;
          case 8:
            this.id_1 = 11;
            this.zy3_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$9: do {
              var this_1 = this.zy3_1.ry2_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.fy3(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.zy3_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$11: do {
              var this_2 = this.zy3_1.ry2_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.fy3(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.zy3_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$7: do {
              var this_3 = this.zy3_1.ry2_1;
              while (true) {
                var prevValue_2 = this_3.t2();
                var nextValue_2 = prevValue_2.fy3(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.qy2_1 = DiscussionPostDetailViewModel$pagingSourceFactory$lambda(this);
    this.ry2_1 = MutableStateFlow(new DiscussionPostDetailUiState2());
    this.sy2_1 = asStateFlow(this.ry2_1);
    this.ty2_1 = MutableStateFlow('');
    this.uy2_1 = asStateFlow(this.ty2_1);
    this.vy2_1 = null;
    var tmp_0 = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.wy2_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_1 = this.aqq();
    launch(tmp_1, VOID, VOID, DiscussionPostDetailViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(DiscussionPostDetailViewModel).dy6 = function (replyText) {
    this.ty2_1.x1k(replyText);
    var tmp0_safe_receiver = this.vy2_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.aqq();
    tmp.vy2_1 = launch(tmp_0, VOID, VOID, DiscussionPostDetailViewModel$onChangeReplyText$slambda_0(this, replyText, null));
  };
  protoOf(DiscussionPostDetailViewModel).py6 = function () {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, DiscussionPostDetailViewModel$onClickPostReply$slambda_0(this, null));
  };
  protoOf(DiscussionPostDetailViewModel).rxz = function (post) {
    var tmp = this.aqq();
    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.fmf(), Companion_getInstance_9().emj()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.xy2_1 = discussionPosts;
    this.yy2_1 = loggedInPersonUid;
    this.zy2_1 = loggedInPersonName;
    this.ay3_1 = loggedInPersonPictureUri;
    this.by3_1 = fieldsEnabled;
    this.cy3_1 = showModerateOptions;
    this.dy3_1 = localDateTimeNow;
    this.ey3_1 = dayOfWeekStrings;
  }
  protoOf(DiscussionPostDetailUiState2).qy6 = function (discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    return new DiscussionPostDetailUiState2(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(DiscussionPostDetailUiState2).fy3 = function (discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings, $super) {
    discussionPosts = discussionPosts === VOID ? this.xy2_1 : discussionPosts;
    loggedInPersonUid = loggedInPersonUid === VOID ? this.yy2_1 : loggedInPersonUid;
    loggedInPersonName = loggedInPersonName === VOID ? this.zy2_1 : loggedInPersonName;
    loggedInPersonPictureUri = loggedInPersonPictureUri === VOID ? this.ay3_1 : loggedInPersonPictureUri;
    fieldsEnabled = fieldsEnabled === VOID ? this.by3_1 : fieldsEnabled;
    showModerateOptions = showModerateOptions === VOID ? this.cy3_1 : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? this.dy3_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.ey3_1 : dayOfWeekStrings;
    return $super === VOID ? this.qy6(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) : $super.qy6.call(this, discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(DiscussionPostDetailUiState2).toString = function () {
    return 'DiscussionPostDetailUiState2(discussionPosts=' + this.xy2_1 + ', loggedInPersonUid=' + this.yy2_1.toString() + ', loggedInPersonName=' + this.zy2_1 + ', loggedInPersonPictureUri=' + this.ay3_1 + ', fieldsEnabled=' + this.by3_1 + ', showModerateOptions=' + this.cy3_1 + ', localDateTimeNow=' + this.dy3_1 + ', dayOfWeekStrings=' + this.ey3_1 + ')';
  };
  protoOf(DiscussionPostDetailUiState2).hashCode = function () {
    var result = hashCode(this.xy2_1);
    result = imul(result, 31) + this.yy2_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.zy2_1) | 0;
    result = imul(result, 31) + (this.ay3_1 == null ? 0 : getStringHashCode(this.ay3_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.by3_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cy3_1) | 0;
    result = imul(result, 31) + this.dy3_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.ey3_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.xy2_1, tmp0_other_with_cast.xy2_1))
      return false;
    if (!this.yy2_1.equals(tmp0_other_with_cast.yy2_1))
      return false;
    if (!(this.zy2_1 === tmp0_other_with_cast.zy2_1))
      return false;
    if (!(this.ay3_1 == tmp0_other_with_cast.ay3_1))
      return false;
    if (!(this.by3_1 === tmp0_other_with_cast.by3_1))
      return false;
    if (!(this.cy3_1 === tmp0_other_with_cast.cy3_1))
      return false;
    if (!this.dy3_1.equals(tmp0_other_with_cast.dy3_1))
      return false;
    if (!equals(this.ey3_1, tmp0_other_with_cast.ey3_1))
      return false;
    return true;
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.zy6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).dy7 = function (it, $completion) {
    var tmp = this.jo1(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.dy7(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.ay7_1.h7f();
            var tmp_1;
            if (!this.zy6_1.rqv_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.by7_1 = tmp_1;
            if (this.by7_1 == null) {
              this.cy7_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.by7_1.vel(this.zy6_1.rqv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.cy7_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.cy7_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).jo1 = function (it, completion) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda(this.zy6_1, completion);
    i.ay7_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.dy7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.my7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).py7 = 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.py7($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.ny7_1 = new DiscussionPost();
            var tmp_1 = this;
            tmp_1.oy7_1 = this.ny7_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.my7_1.dqq());
            suspendResult = tmp_2.o62(132, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.oy7_1.nem_1 = ARGUMENT;
            this.oy7_1.sem_1 = _get_courseBlockUidArg__1bqljt(this.my7_1);
            this.oy7_1.uem_1 = this.my7_1.zqp().toc().cl0_1;
            this.oy7_1.rem_1 = systemTimeInMillis();
            return this.ny7_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.my7_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.py7($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.ny8_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.ty8(entityToDisplay);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function DiscussionPostEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.cy9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda).ey9 = 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.ey9((!(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.cy9_1, null);
            var tmp_2 = DiscussionPostEditViewModel$slambda$slambda$slambda_2(this.cy9_1, null);
            suspendResult = this.cy9_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, DiscussionPostEditViewModel$slambda$slambda$lambda(this.cy9_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.cy9_1, completion);
    i.dy9_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.ey9($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$slambda$slambda(this$0, $post, resultContinuation) {
    this.ny9_1 = this$0;
    this.oy9_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(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.io1(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.ny9_1.fqq().h7f().xel(this.oy9_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).jo1 = function (it, completion) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda$slambda(this.ny9_1, this.oy9_1, completion);
    i.py9_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_discussionPostUid__impog9($this) {
    Companion_getInstance_117();
    var tmp0_safe_receiver = $this.jqp_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_126();
    var tmp0_safe_receiver = $this.jqp_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_170() {
    this.qy9_1 = 'DiscussionPostEdit';
  }
  var Companion_instance_219;
  function Companion_getInstance_187() {
    return Companion_instance_219;
  }
  function DiscussionPostEditViewModel$slambda(this$0, resultContinuation) {
    this.zy9_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.aya_1, VOID, VOID, DiscussionPostEditViewModel$slambda$slambda_0(this.zy9_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.zy9_1.ny8_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ty8(VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.zy9_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_0 = this.zy9_1.jqq().vol(strings_getInstance().cnl_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_0, VOID, DiscussionPostEditViewModel$onClickSave$ref(this.zy9_1));
                var tmp1_loadingState = Companion_getInstance_98().dq9_1;
                var nextValue_0 = prevValue_0.vq8(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.zy9_1, completion);
    i.aya_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.jya_1 = $commitDelay;
    this.kya_1 = $entity;
    this.lya_1 = $this;
    this.mya_1 = $key;
    this.nya_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.jya_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.kya_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.lya_1.pqq(this.lya_1.jqp_1, this.mya_1, this.nya_1, this.kya_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.jya_1, this.kya_1, this.lya_1, this.mya_1, this.nya_1, completion);
    i.oya_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.xya_1 = this$0;
    this.yya_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.xya_1.ny8_1.t2().ry8_1 == null ? this.xya_1.ny8_1.t2().sy8_1 == null : false) {
              this.hd_1 = 1;
              suspendResult = this.xya_1.dqq().p7d().mcl(this.yya_1.sem_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 1:
            this.ayb_1 = suspendResult;
            this.yya_1.vem_1 = this.ayb_1;
            if (this.yya_1.vem_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = this.xya_1.fqq().p7d().mcl(this.yya_1.sem_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.byb_1 = suspendResult;
            this.yya_1.vem_1 = this.byb_1;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.hd_1 = 4;
            var tmp_0 = this.xya_1.fqq();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, DiscussionPostEditViewModel$onClickSave$slambda$slambda_0(this.xya_1, this.yya_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var tmp_1 = this.yya_1.nem_1;
            var this_0 = LinkedHashMap_init_$Create$();
            Companion_getInstance_126();
            this.xya_1.wqq(this_0, 'clazzUid');
            this.xya_1.sqv('CourseDiscussionPost', tmp_1, this.yya_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.xya_1, this.yya_1, completion);
    i.zya_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.ny8_1 = MutableStateFlow(new DiscussionPostEditUiState());
    this.oy8_1 = asStateFlow(this.ny8_1);
    this.lqq(Companion_getInstance_98().cq9_1);
    var title = _get_discussionPostUid__impog9(this).equals(new Long(0, 0)) ? this.jqq().vol(strings_getInstance().bnn_1) : this.jqq().vol(strings_getInstance().amx_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_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.aqq();
    launch(tmp, VOID, VOID, DiscussionPostEditViewModel$slambda_0(this, null));
  }
  protoOf(DiscussionPostEditViewModel).cyb = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ny8_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.py8_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pem_1;
        var tmp_0 = this.uqw(tmp, entity == null ? null : entity.pem_1, prevValue.ry8_1);
        var tmp2_safe_receiver = prevValue.py8_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.qem_1;
        var nextValue = prevValue.ty8(entity, VOID, tmp_0, this.uqw(tmp_1, entity == null ? null : entity.qem_1, prevValue.sy8_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_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.aqq();
    tmp_2.qqv_1 = launch(tmp_3, VOID, VOID, DiscussionPostEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(DiscussionPostEditViewModel).vsd = function () {
    var tmp0_elvis_lhs = this.ny8_1.t2().py8_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.ny8_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.jqq().vol(strings_getInstance().cmp_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.jqq().vol(strings_getInstance().cmp_1);
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.ty8(VOID, VOID, tmp_1, tmp_2);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.aqq();
    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.py8_1 = discussionPost;
    this.qy8_1 = fieldsEnabled;
    this.ry8_1 = discussionPostTitleError;
    this.sy8_1 = discussionPostDescError;
  }
  protoOf(DiscussionPostEditUiState).dyb = function (discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) {
    return new DiscussionPostEditUiState(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError);
  };
  protoOf(DiscussionPostEditUiState).ty8 = function (discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError, $super) {
    discussionPost = discussionPost === VOID ? this.py8_1 : discussionPost;
    fieldsEnabled = fieldsEnabled === VOID ? this.qy8_1 : fieldsEnabled;
    discussionPostTitleError = discussionPostTitleError === VOID ? this.ry8_1 : discussionPostTitleError;
    discussionPostDescError = discussionPostDescError === VOID ? this.sy8_1 : discussionPostDescError;
    return $super === VOID ? this.dyb(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) : $super.dyb.call(this, discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError);
  };
  protoOf(DiscussionPostEditUiState).toString = function () {
    return 'DiscussionPostEditUiState(discussionPost=' + this.py8_1 + ', fieldsEnabled=' + this.qy8_1 + ', discussionPostTitleError=' + this.ry8_1 + ', discussionPostDescError=' + this.sy8_1 + ')';
  };
  protoOf(DiscussionPostEditUiState).hashCode = function () {
    var result = this.py8_1 == null ? 0 : hashCode(this.py8_1);
    result = imul(result, 31) + getBooleanHashCode(this.qy8_1) | 0;
    result = imul(result, 31) + (this.ry8_1 == null ? 0 : getStringHashCode(this.ry8_1)) | 0;
    result = imul(result, 31) + (this.sy8_1 == null ? 0 : getStringHashCode(this.sy8_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.py8_1, tmp0_other_with_cast.py8_1))
      return false;
    if (!(this.qy8_1 === tmp0_other_with_cast.qy8_1))
      return false;
    if (!(this.ry8_1 == tmp0_other_with_cast.ry8_1))
      return false;
    if (!(this.sy8_1 == tmp0_other_with_cast.sy8_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.pog_1;
    } else {
      tmp = _this__u8e3s4.pog_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.iyc_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.wyc(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.fyd_1 = this$0;
    this.gyd_1 = $cevOpenUri;
    this.hyd_1 = $manifest;
    this.iyd_1 = $cevManifestUrlObj;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda$slambda$slambda).syd = function (it, $completion) {
    var tmp = this.tyd(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.syd(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.kyd_1 = _get_httpClient__2ty1zc_2(this.fyd_1);
            var tmp_1 = this;
            tmp_1.lyd_1 = invoke$urlToLoad(this.jyd_1, this.gyd_1, this.hyd_1, this.fyd_1, this.iyd_1);
            var tmp_2 = this;
            tmp_2.myd_1 = this.kyd_1;
            var tmp_3 = this;
            tmp_3.nyd_1 = this.myd_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.lyd_1);
            tmp_4.oyd_1 = this_0;
            this.oyd_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_5 = this;
            tmp_5.pyd_1 = this.nyd_1;
            var tmp_6 = this;
            tmp_6.qyd_1 = this.oyd_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.qyd_1, this.pyd_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ryd_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsDecodedText(this.ryd_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).tyd = function (it, completion) {
    var i = new EpubContentViewModel$slambda$slambda$slambda(this.fyd_1, this.gyd_1, this.hyd_1, this.iyd_1, completion);
    i.jyd_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.syd(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function invoke$urlToLoad_0(_this__u8e3s4, this$0, cevManifestUrlObj) {
    var tmp;
    if (this$0.eyc_1) {
      tmp = _this__u8e3s4.toi_1;
    } else {
      tmp = cevManifestUrlObj.sp4(_this__u8e3s4.loi_1).toString();
    }
    return tmp;
  }
  function EpubContentViewModel$slambda$slambda($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation) {
    this.cye_1 = $manifest;
    this.dye_1 = $cevOpenUri;
    this.eye_1 = this$0;
    this.fye_1 = $opfBaseUrl;
    this.gye_1 = $argTocString;
    this.hye_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.jye_1 = requireEntryByUri(this.cye_1, this.dye_1);
            var tmp_0 = this;
            tmp_0.kye_1 = _get_httpClient__2ty1zc_2(this.eye_1);
            var tmp_1 = this;
            tmp_1.lye_1 = invoke$urlToLoad_0(this.jye_1, this.eye_1, this.hye_1);
            var tmp_2 = this;
            tmp_2.mye_1 = this.kye_1;
            var tmp_3 = this;
            tmp_3.nye_1 = this.mye_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.lye_1);
            tmp_4.oye_1 = this_0;
            this.oye_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_5 = this;
            tmp_5.pye_1 = this.nye_1;
            var tmp_6 = this;
            tmp_6.qye_1 = this.oye_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.qye_1, this.pye_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            this.sye_1 = suspendResult;
            this.tye_1 = _get_xml__e6jxp6(this.eye_1).s45(Companion_instance_76.n4r(), this.sye_1);
            var tmp_7 = this;
            var this_1 = this.tye_1.toh_1.yog_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.oog_1, element);
            }

            tmp_7.uye_1 = destination;
            var tmp_8 = this;
            var this_2 = this.tye_1.uoh_1.xoh_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.uye_1.q(element_0.uog_1);
              var tmp_9;
              if (tmp0_safe_receiver == null) {
                tmp_9 = null;
              } else {
                tmp_9 = this.fye_1.sp4(tmp0_safe_receiver.pog_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.vye_1 = destination_0;
            var tmp_10 = this;
            var tmp0_safe_receiver_1 = this.tye_1.voh();
            var tmp_11;
            if (tmp0_safe_receiver_1 == null) {
              tmp_11 = null;
            } else {
              tmp_11 = this.fye_1.sp4(tmp0_safe_receiver_1.pog_1);
            }

            var tmp1_safe_receiver_0 = tmp_11;
            tmp_10.wye_1 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.toString();
            l$ret$1: do {
              var this_3 = this.eye_1.iyc_1;
              while (true) {
                var prevValue = this_3.t2();
                var tmp0_safe_receiver_2 = firstOrNull(this.tye_1.soh_1.ioh_1);
                var nextValue = prevValue.wyc(VOID, this.vye_1, VOID, VOID, VOID, this.wye_1, tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.hog_1);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_4 = this.eye_1.nqp_1;
              while (true) {
                var prevValue_0 = this_4.t2();
                var tmp0_safe_receiver_3 = firstOrNull(this.tye_1.soh_1.goh_1);
                var tmp1_elvis_lhs = tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.log_1;
                var tmp_12 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
                var tmp2_elvis_lhs = this.gye_1;
                var tmp_13 = tmp2_elvis_lhs == null ? this.eye_1.jqq().vol(strings_getInstance().knn_1) : tmp2_elvis_lhs;
                var nextValue_0 = prevValue_0.vq8(VOID, VOID, tmp_12, VOID, VOID, VOID, VOID, VOID, VOID, listOf_0(new OverflowItem(tmp_13, EpubContentViewModel$slambda$slambda$lambda(this.eye_1))));
                if (this_4.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp_14 = this.eye_1;
            var tmp2_safe_receiver = this.tye_1.woh();
            var tmp_15;
            if (tmp2_safe_receiver == null) {
              tmp_15 = null;
            } else {
              tmp_15 = this.fye_1.sp4(tmp2_safe_receiver.pog_1).toString();
            }

            tmp_14.nyc_1 = tmp_15;
            this.hd_1 = 3;
            suspendResult = this.eye_1.dyc_1.tpg(this.tye_1, EpubContentViewModel$slambda$slambda$slambda_0(this.eye_1, this.dye_1, this.cye_1, this.hye_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.eye_1.iyc_1;
              while (true) {
                var prevValue_1 = this_5.t2();
                var nextValue_1 = prevValue_1.wyc(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.cye_1, this.dye_1, this.eye_1, this.fye_1, this.gye_1, this.hye_1, completion);
    i.iye_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.gyc_1;
    httpClient$factory_6();
    return this_0.t2();
  }
  function _get_xml__e6jxp6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hyc_1;
    xml$factory_0();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kyc_1;
    openExternalLinkUseCase$factory_2();
    return this_0.t2();
  }
  function Companion_171() {
    this.xye_1 = 'manifestUrl';
    this.yye_1 = 'cevUri';
    this.zye_1 = 'navigationVisible';
    this.ayf_1 = 'tocString';
    this.byf_1 = 'xapiStatementsUrl';
    this.cyf_1 = 'EpubContent';
  }
  var Companion_instance_220;
  function Companion_getInstance_188() {
    return Companion_instance_220;
  }
  function EpubContentViewModel$slambda($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation) {
    this.lyf_1 = $argManifestUrl;
    this.myf_1 = $argCevOpenUri;
    this.nyf_1 = this$0;
    this.oyf_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.lyf_1 == null) ? !(this.myf_1 == null) : false) {
              var tmp_0 = this;
              tmp_0.qyf_1 = to(this.lyf_1, this.myf_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.nyf_1.fqq().i7f().fbq(this.nyf_1.fyc_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ryf_1 = suspendResult;
            var tmp_1 = this;
            var tmp_2;
            if (this.ryf_1 == null) {
              return Unit_instance;
            } else {
              tmp_2 = this.ryf_1;
            }

            tmp_1.syf_1 = tmp_2;
            var tmp_3 = this;
            var tmp1_elvis_lhs = this.syf_1.pax_1;
            var tmp_4;
            if (tmp1_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_4 = tmp1_elvis_lhs;
            }

            tmp_3.tyf_1 = tmp_4;
            var tmp_5 = this;
            var tmp2_elvis_lhs = this.syf_1.nax_1;
            var tmp_6;
            if (tmp2_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_6 = tmp2_elvis_lhs;
            }

            tmp_5.uyf_1 = tmp_6;
            this.qyf_1 = to(this.tyf_1, this.uyf_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.vyf_1 = this.qyf_1;
            this.wyf_1 = this.vyf_1.y6();
            this.xyf_1 = this.vyf_1.z6();
            this.yyf_1 = UrlKmp(this.wyf_1);
            this.zyf_1 = this.yyf_1.sp4(this.xyf_1);
            var tmp_7 = this;
            tmp_7.ayg_1 = this.nyf_1.m4r();
            var tmp_8 = this;
            tmp_8.byg_1 = _get_httpClient__2ty1zc_2(this.nyf_1);
            var tmp_9 = this;
            tmp_9.cyg_1 = this.wyf_1;
            var tmp_10 = this;
            tmp_10.dyg_1 = this.byg_1;
            var tmp_11 = this;
            tmp_11.eyg_1 = this.dyg_1;
            var tmp_12 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.cyg_1);
            tmp_12.fyg_1 = this_0;
            this.fyg_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_13 = this;
            tmp_13.gyg_1 = this.eyg_1;
            var tmp_14 = this;
            tmp_14.hyg_1 = this.fyg_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.hyg_1, this.gyg_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 4:
            this.jyg_1 = suspendResult;
            var tmp_15 = this;
            var this_1 = this.ayg_1.t45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_15.kyg_1 = this.ayg_1.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.jyg_1);
            this.hd_1 = 5;
            var tmp_16 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_16, EpubContentViewModel$slambda$slambda_0(this.kyg_1, this.xyf_1, this.nyf_1, this.zyf_1, this.oyf_1, this.yyf_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.lyf_1, this.myf_1, this.nyf_1, this.oyf_1, completion);
    i.pyf_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.dyc_1 = getEpubTableOfContentsUseCase;
    this.eyc_1 = useBodyDataUrls;
    var tmp_2 = this;
    Companion_getInstance_117();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_2.fyc_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.gyc_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.hyc_1 = Instance(this, tmp$ret$4, null).a5d(this, xml$factory());
    this.iyc_1 = MutableStateFlow(new EpubContentUiState(this.fyc_1));
    this.jyc_1 = asStateFlow(this.iyc_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.kyc_1 = Instance(this, tmp$ret$6, null).a5d(this, openExternalLinkUseCase$factory_1());
    this.lyc_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.myc_1 = asSharedFlow(this.lyc_1);
    this.nyc_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.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, VOID, argNavigationVisible, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.aqq();
    launch(tmp_9, VOID, VOID, EpubContentViewModel$slambda_0(argManifestUrl, argCevOpenUri, this, argTocString, null));
  }
  protoOf(EpubContentViewModel).lyg = function () {
    var langCodeVal = this.iyc_1.t2().uyc_1;
    var titleVal = this.nqp_1.t2().iq8_1;
    var tmp;
    if (!(langCodeVal == null) ? !(titleVal == null) : false) {
      tmp = new TitleAndLangCode(titleVal, langCodeVal);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(EpubContentViewModel).myg = function (baseUrl, href) {
    var url = UrlKmp(baseUrl).sp4(href);
    var urlStr = url.toString();
    var hashIndex = indexOf_0(urlStr, '#');
    var urlWithoutHash = substringBefore_0(urlStr, '#');
    var indexInSpine = this.iyc_1.t2().pyc_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.lyc_1.i1h(new EpubScrollCommand(indexInSpine, tmp));
    } else {
      _get_openExternalLinkUseCase__ku5z07_0(this).epl(url.toString(), LinkTarget_BLANK_getInstance());
    }
  };
  protoOf(EpubContentViewModel).nyg = function (tocItem) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.iyc_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickTocItem.<anonymous>' call
        var nextValue = prevValue.wyc(VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_elvis_lhs = this.nyc_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var baseHref = tmp;
    var tmp1_elvis_lhs = tocItem.opg_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var itemUrl = tmp_0;
    this.myg(baseHref, itemUrl);
  };
  protoOf(EpubContentViewModel).oyg = function (tocItem) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.iyc_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickToggleTocItem.<anonymous>' call
        var tmp;
        if (prevValue.syc_1.a1(tocItem.mpg_1)) {
          // Inline function 'kotlin.collections.filter' call
          // Inline function 'kotlin.collections.filterTo' call
          var this_1 = prevValue.syc_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.mpg_1)) {
              destination.i1(element);
            }
          }
          tmp = toSet(destination);
        } else {
          tmp = plus_2(prevValue.syc_1, tocItem.mpg_1);
        }
        var nextValue = prevValue.wyc(VOID, VOID, VOID, VOID, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(EpubContentViewModel).pyg = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.iyc_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onDismissTableOfContentsDrawer.<anonymous>' call
        var nextValue = prevValue.wyc(VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(EpubContentViewModel).qyg = function (index) {
    var spineSize = this.iyc_1.t2().pyc_1.u();
    if (spineSize <= 0)
      return Unit_instance;
    if (index === (spineSize - 1 | 0)) {
      this.pq5(true);
    } else {
      this.oq5(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.oyc_1 = contentEntryVersionUid;
    this.pyc_1 = spineUrls;
    this.qyc_1 = tableOfContents;
    this.ryc_1 = tableOfContentsOpen;
    this.syc_1 = collapsedTocUids;
    this.tyc_1 = coverImageUrl;
    this.uyc_1 = langCode;
    var tmp = this;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.qyc_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.syc_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.ryh(element_0)) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
        }
        tmp$ret$0 = false;
      }
      if (!tmp$ret$0) {
        destination.i1(element);
      }
    }
    tmp.vyc_1 = destination;
  }
  protoOf(EpubContentUiState).syh = function (contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) {
    return new EpubContentUiState(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode);
  };
  protoOf(EpubContentUiState).wyc = function (contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode, $super) {
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.oyc_1 : contentEntryVersionUid;
    spineUrls = spineUrls === VOID ? this.pyc_1 : spineUrls;
    tableOfContents = tableOfContents === VOID ? this.qyc_1 : tableOfContents;
    tableOfContentsOpen = tableOfContentsOpen === VOID ? this.ryc_1 : tableOfContentsOpen;
    collapsedTocUids = collapsedTocUids === VOID ? this.syc_1 : collapsedTocUids;
    coverImageUrl = coverImageUrl === VOID ? this.tyc_1 : coverImageUrl;
    langCode = langCode === VOID ? this.uyc_1 : langCode;
    return $super === VOID ? this.syh(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) : $super.syh.call(this, contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode);
  };
  protoOf(EpubContentUiState).toString = function () {
    return 'EpubContentUiState(contentEntryVersionUid=' + this.oyc_1.toString() + ', spineUrls=' + this.pyc_1 + ', tableOfContents=' + this.qyc_1 + ', tableOfContentsOpen=' + this.ryc_1 + ', collapsedTocUids=' + this.syc_1 + ', coverImageUrl=' + this.tyc_1 + ', langCode=' + this.uyc_1 + ')';
  };
  protoOf(EpubContentUiState).hashCode = function () {
    var result = this.oyc_1.hashCode();
    result = imul(result, 31) + hashCode(this.pyc_1) | 0;
    result = imul(result, 31) + hashCode(this.qyc_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ryc_1) | 0;
    result = imul(result, 31) + hashCode(this.syc_1) | 0;
    result = imul(result, 31) + (this.tyc_1 == null ? 0 : getStringHashCode(this.tyc_1)) | 0;
    result = imul(result, 31) + (this.uyc_1 == null ? 0 : getStringHashCode(this.uyc_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.oyc_1.equals(tmp0_other_with_cast.oyc_1))
      return false;
    if (!equals(this.pyc_1, tmp0_other_with_cast.pyc_1))
      return false;
    if (!equals(this.qyc_1, tmp0_other_with_cast.qyc_1))
      return false;
    if (!(this.ryc_1 === tmp0_other_with_cast.ryc_1))
      return false;
    if (!equals(this.syc_1, tmp0_other_with_cast.syc_1))
      return false;
    if (!(this.tyc_1 == tmp0_other_with_cast.tyc_1))
      return false;
    if (!(this.uyc_1 == tmp0_other_with_cast.uyc_1))
      return false;
    return true;
  };
  function EpubScrollCommand(spineIndex, hash) {
    hash = hash === VOID ? null : hash;
    this.tyh_1 = spineIndex;
    this.uyh_1 = hash;
  }
  protoOf(EpubScrollCommand).toString = function () {
    return 'EpubScrollCommand(spineIndex=' + this.tyh_1 + ', hash=' + this.uyh_1 + ')';
  };
  protoOf(EpubScrollCommand).hashCode = function () {
    var result = this.tyh_1;
    result = imul(result, 31) + (this.uyh_1 == null ? 0 : getStringHashCode(this.uyh_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.tyh_1 === tmp0_other_with_cast.tyh_1))
      return false;
    if (!(this.uyh_1 == tmp0_other_with_cast.uyh_1))
      return false;
    return true;
  };
  function EpubTocItem(uid, label, href, children, parentUids, indentLevel) {
    parentUids = parentUids === VOID ? emptySet() : parentUids;
    indentLevel = indentLevel === VOID ? 0 : indentLevel;
    this.mpg_1 = uid;
    this.npg_1 = label;
    this.opg_1 = href;
    this.ppg_1 = children;
    this.qpg_1 = parentUids;
    this.rpg_1 = indentLevel;
    var tmp = this;
    // Inline function 'kotlin.collections.isNotEmpty' call
    tmp.spg_1 = !this.ppg_1.c1();
  }
  protoOf(EpubTocItem).ryh = function (uid) {
    return this.qpg_1.a1(uid);
  };
  protoOf(EpubTocItem).toString = function () {
    return 'EpubTocItem(uid=' + this.mpg_1 + ', label=' + this.npg_1 + ', href=' + this.opg_1 + ', children=' + this.ppg_1 + ', parentUids=' + this.qpg_1 + ', indentLevel=' + this.rpg_1 + ')';
  };
  protoOf(EpubTocItem).hashCode = function () {
    var result = this.mpg_1;
    result = imul(result, 31) + getStringHashCode(this.npg_1) | 0;
    result = imul(result, 31) + (this.opg_1 == null ? 0 : getStringHashCode(this.opg_1)) | 0;
    result = imul(result, 31) + hashCode(this.ppg_1) | 0;
    result = imul(result, 31) + hashCode(this.qpg_1) | 0;
    result = imul(result, 31) + this.rpg_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.mpg_1 === tmp0_other_with_cast.mpg_1))
      return false;
    if (!(this.npg_1 === tmp0_other_with_cast.npg_1))
      return false;
    if (!(this.opg_1 == tmp0_other_with_cast.opg_1))
      return false;
    if (!equals(this.ppg_1, tmp0_other_with_cast.ppg_1))
      return false;
    if (!equals(this.qpg_1, tmp0_other_with_cast.qpg_1))
      return false;
    if (!(this.rpg_1 === tmp0_other_with_cast.rpg_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_172() {
    this.vyh_1 = 'Error';
  }
  var Companion_instance_221;
  function Companion_getInstance_189() {
    return Companion_instance_221;
  }
  function LoginViewModel$getCredentials$slambda$lambda($credentialResult) {
    return function () {
      return 'Error occurred: ' + $credentialResult.nr6_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.vyi_1;
    impl$factory_2();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wyi_1;
    httpClient$factory_8();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xyi_1;
    apiUrlConfig$factory_8();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zyi_1;
    setLanguageUseCase$factory_2();
    return this_0.t2();
  }
  function _get_languagesConfig__hebcss($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ayj_1;
    languagesConfig$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dyj_1;
    getVersionUseCase$factory_2();
    return this_0.t2();
  }
  function _get_getShowPoweredByUseCase__5l0p0e_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.eyj_1;
    getShowPoweredByUseCase$factory_2();
    return this_0.t2();
  }
  function _get_getCredentialUseCase__qofq9r_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.iyj_1;
    getCredentialUseCase$factory_2();
    return this_0.t2();
  }
  function _get_parseCredentialUsernameUseCase__8m48wk_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jyj_1;
    parseCredentialUsernameUseCase$factory_2();
    return this_0.t2();
  }
  function onSiteVerified($this, site) {
    $this.yyi_1 = site;
    $this.lqq(Companion_getInstance_98().dq9_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.ryi_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onSiteVerified.<anonymous>' call
        var tmp0_connectAsGuestVisible = site.bhp_1;
        var nextValue = prevValue.zyj(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) {
      if ($this.fyj_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.login.LoginViewModel.goToNextDestAfterLoginOrGuestSelected.<anonymous>' call
        Companion_getInstance_126();
        this_0.s('next', $this.tyi_1);
        $this.xqq(this_0, Companion_getInstance_215().vr9_1);
        Companion_getInstance_126();
        $this.wqq(this_0, 'next');
        var tmp$ret$2 = this_0.f3();
        $this.lqp_1.wp8('ChildProfileList', tmp$ret$2);
        return Unit_instance;
      }
      var tmp_0 = $this;
      Companion_getInstance_170();
      tmp_0.tyi_1 = 'ContentEntryListHome';
    }
    $this.vqw($this.lqp_1, appendSelectedAccount($this.tyi_1, person.f96_1, new LearningSpace($this.uyi_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.aqq();
    launch(tmp_0, VOID, VOID, LoginViewModel$getCredentials$slambda_0(getCredentialUseCaseVal, $this, null));
  }
  function Companion_173() {
    this.ayk_1 = 'Login';
  }
  var Companion_instance_222;
  function Companion_getInstance_190() {
    return Companion_instance_222;
  }
  function LoginViewModel$slambda(this$0, resultContinuation) {
    this.jyk_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.jyk_1.yyi_1 == null)) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.id_1 = 3;
            this.hd_1 = 2;
            suspendResult = verifySite(_get_httpClient__2ty1zc_3(this.jyk_1), this.jyk_1.uyi_1, new Long(10000, 0), this.jyk_1.m4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.lyk_1 = suspendResult;
            onSiteVerified(this.jyk_1, this.lyk_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.myk_1 = this.kd_1;
              Napier_getInstance().m5e('Could not load site object for ' + this.jyk_1.uyi_1, this.myk_1);
              l$ret$1: do {
                var this_0 = this.jyk_1.ryi_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.zyj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, _get_impl__d88w17_0(this.jyk_1).vol(strings_getInstance().hmk_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.jyk_1, completion);
    i.kyk_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.tyi_1;
    };
  }
  function LoginViewModel$onClickLogin$slambda(this$0, $username, $password, resultContinuation) {
    this.vyk_1 = this$0;
    this.wyk_1 = $username;
    this.xyk_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.zyk_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.vyk_1.zqp();
            var this_0 = this.wyk_1;
            var tmp_1 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var this_1 = this.xyk_1;
            var tmp_2 = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
            var tmp_3 = this.vyk_1.uyi_1;
            Companion_getInstance_117();
            var tmp0_safe_receiver = this.vyk_1.jqp_1.ba('maxDob');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            suspendResult = tmp_0.dod(tmp_1, tmp_2, tmp_3, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this.vyk_1.gyj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.byl_1 = suspendResult;
            if (!this.vyk_1.hyj_1) {
              var tmp_4 = this;
              var this_2 = this.vyk_1.a57();
              var context = new LearningSpace(this.vyk_1.uyi_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.cyl_1 = tmp_7.e58(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), null);
              this.dyl_1 = this.cyl_1;
              if (this.dyl_1 == null) {
                this.eyl_1 = null;
                this.hd_1 = 4;
                continue $sm;
              } else {
                this.hd_1 = 3;
                var this_3 = this.wyk_1;
                var tmp_9 = toString(trim(isCharSequence(this_3) ? this_3 : THROW_CCE()));
                var this_4 = this.xyk_1;
                suspendResult = this.dyl_1.apf(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.eyl_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.vyk_1, this.byl_1.kl0());
            tmp_11.ayl_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.zyk_1 = _get_impl__d88w17_0(this.vyk_1).vol(strings_getInstance().png_1);
              tmp_13.ayl_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.zyk_1 = _get_impl__d88w17_0(this.vyk_1).vol(strings_getInstance().gmk_1);
                tmp_15.ayl_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.zyk_1 = _get_impl__d88w17_0(this.vyk_1).vol(strings_getInstance().ong_1);
                  tmp_17.ayl_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.zyk_1 = _get_impl__d88w17_0(this.vyk_1).vol(strings_getInstance().hmk_1);
                    tmp_19.ayl_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.vyk_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$3: do {
              var this_5 = this.vyk_1.ryi_1;
              while (true) {
                var prevValue = this_5.t2();
                var nextValue = prevValue.zyj(VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, this.zyk_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.vyk_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$5: do {
              var this_6 = this.vyk_1.ryi_1;
              while (true) {
                var prevValue_0 = this_6.t2();
                var nextValue_0 = prevValue_0.zyj(VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, this.zyk_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.vyk_1, this.wyk_1, this.xyk_1, completion);
    i.yyk_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.nyl_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.nyl_1.zqp().eod(this.nyl_1.uyi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var guestPerson = suspendResult;
            goToNextDestAfterLoginOrGuestSelected(this.nyl_1, guestPerson.znw_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.nyl_1, completion);
    i.oyl_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.xyl_1 = $getCredentialUseCaseVal;
    this.yyl_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.xyl_1.vpd(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.aym_1 = suspendResult;
            var tmp_0 = this.aym_1;
            if (tmp_0 instanceof PasskeyCredentialResult) {
              this.hd_1 = 2;
              suspendResult = this.yyl_1.zqp().cod(this.aym_1.rr8_1, this.yyl_1.uyi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this.aym_1;
              if (tmp_1 instanceof PasswordCredentialResult) {
                var tmp0_container = _get_parseCredentialUsernameUseCase__8m48wk_0(this.yyl_1).zpb(this.aym_1.pr8_1);
                var learningSpace = tmp0_container.y6();
                var username = tmp0_container.z6();
                this.yyl_1.bym(username);
                this.yyl_1.cym(this.aym_1.qr8_1);
                this.yyl_1.hyj_1 = true;
                var tmp_2 = this.yyl_1;
                var this_0 = learningSpace.xnv_1;
                Companion_getInstance_117();
                this.yyl_1.jqp_1.mql('learningSpaceUrl', this_0);
                tmp_2.uyi_1 = this_0;
                this.yyl_1.dym();
                this.hd_1 = 3;
                continue $sm;
              } else {
                var tmp_3 = this.aym_1;
                if (tmp_3 instanceof Error_2) {
                  l$ret$1: do {
                    var this_1 = this.yyl_1.ryi_1;
                    while (true) {
                      var prevValue = this_1.t2();
                      var nextValue = prevValue.zyj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.aym_1.nr6_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.aym_1));
                  this.hd_1 = 3;
                  continue $sm;
                } else {
                  var tmp_5;
                  var tmp_6 = this.aym_1;
                  if (tmp_6 instanceof NoCredentialAvailableResult) {
                    tmp_5 = true;
                  } else {
                    var tmp_7 = this.aym_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.yyl_1, account.kl0());
            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.xyl_1, this.yyl_1, completion);
    i.zyl_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.ryi_1 = MutableStateFlow(new LoginUiState());
    this.syi_1 = asStateFlow(this.ryi_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.vyi_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.wyi_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.xyi_1 = Instance(this, tmp$ret$4, null).a5d(this, apiUrlConfig$factory_7());
    this.yyi_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.zyi_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.ayj_1 = Instance(this, tmp$ret$8, null).a5d(this, languagesConfig$factory());
    this.byj_1 = new ValidateUsernameUseCase();
    this.cyj_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.dyj_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.eyj_1 = InstanceOrNull(this, tmp$ret$12, null).a5d(this, getShowPoweredByUseCase$factory_1());
    var tmp_13 = this;
    tmp_13.fyj_1 = !(savedStateHandle.ba('childName') == null);
    var tmp_14 = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    tmp_14.gyj_1 = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    this.hyj_1 = false;
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(GetCredentialUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.iyj_1 = InstanceOrNull(this, tmp$ret$14, null).a5d(this, getCredentialUseCase$factory_1());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(ParseCredentialUsernameUseCase), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.jyj_1 = Instance(this, tmp$ret$16, null).a5d(this, parseCredentialUsernameUseCase$factory_1());
    var tmp_19 = this;
    Companion_getInstance_117();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_20;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_141();
      tmp_20 = 'CourseListHome';
    } else {
      tmp_20 = tmp0_elvis_lhs;
    }
    tmp_19.tyi_1 = tmp_20;
    var tmp_21 = this;
    Companion_getInstance_117();
    var tmp1_elvis_lhs_0 = savedStateHandle.ba('learningSpaceUrl');
    var tmp2_elvis_lhs = tmp1_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_3(this).io8_1 : tmp1_elvis_lhs_0;
    tmp_21.uyi_1 = tmp2_elvis_lhs == null ? 'http://localhost' : tmp2_elvis_lhs;
    Companion_getInstance_117();
    savedStateHandle.mql('learningSpaceUrl', this.uyi_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ryi_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
        var tmp_22 = this.jqq().vol(strings_getInstance().bno_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.cph();
        var tmp_23 = tmp_22 + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.aph_1);
        Companion_getInstance_117();
        var tmp_24 = savedStateHandle.ba('intMsg');
        var tmp_25 = _get_languagesConfig__hebcss(this).iqa(this.jqq());
        var tmp_26 = _get_languagesConfig__hebcss(this).jqa(this.jqq());
        var tmp2_safe_receiver = _get_getShowPoweredByUseCase__5l0p0e_0(this);
        var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.cph();
        var nextValue = prevValue.zyj(VOID, VOID, VOID, VOID, VOID, tmp_23, VOID, tmp_24, VOID, tmp_25, tmp_26, VOID, tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    Companion_getInstance_215();
    if (savedStateHandle.ba('personalAccount') === 'true') {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.ryi_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.zyj(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).vol(strings_getInstance().pmj_1);
    var baseAppUiState = new AppUiState(VOID, VOID, tmp3_title, false, VOID, VOID, false);
    this.uyi_1 = requirePostfix(this.uyi_1, '/');
    Companion_getInstance_117();
    var siteJsonStr = savedStateHandle.ba('site');
    if (!(siteJsonStr == null)) {
      this.nqp_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.ryi_1;
        while (true) {
          var prevValue_1 = this_5.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
          var nextValue_1 = prevValue_1.zyj(VOID, VOID, false);
          if (this_5.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
      this.nqp_1.x1k(baseAppUiState.vq8(VOID, Companion_getInstance_98().cq9_1));
      var tmp_27 = this.aqq();
      launch(tmp_27, VOID, VOID, LoginViewModel$slambda_0(this, null));
    }
    getCredentials_0(this);
  }
  protoOf(LoginViewModel).bym = function (newValue) {
    this.hyj_1 = false;
    var filteredValue = this.cyj_1.ypg(newValue, '');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ryi_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onUsernameChanged.<anonymous>' call
        var nextValue = prevValue.zyj(filteredValue);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(LoginViewModel).cym = function (password) {
    this.hyj_1 = false;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ryi_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.zyj(VOID, password);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(LoginViewModel).dym = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ryi_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.kyj_1;
        var tmp0_username = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
        // Inline function 'kotlin.text.trim' call
        var this_2 = prevValue.lyj_1;
        var tmp1_password = toString(trim(isCharSequence(this_2) ? this_2 : THROW_CCE()));
        var nextValue = prevValue.zyj(tmp0_username, tmp1_password, false, null, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var username = this.ryi_1.t2().kyj_1;
    var password = this.ryi_1.t2().lyj_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.byj_1.zpb(username);
      if (!validationResult.equals(Companion_getInstance_75().ypq_1)) {
        $l$block_0: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_3 = this.ryi_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.dpr_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).vol(tmp0_safe_receiver);
            }
            var nextValue_0 = prevValue_0.zyj(VOID, VOID, true, tmp_0);
            if (this_3.y1k(prevValue_0, nextValue_0)) {
              break $l$block_0;
            }
          }
        }
        return Unit_instance;
      }
      this.lqq(Companion_getInstance_98().cq9_1);
      var tmp_1 = this.aqq();
      launch(tmp_1, VOID, VOID, LoginViewModel$onClickLogin$slambda_0(this, username, password, null));
    } else {
      this.lqq(Companion_getInstance_98().dq9_1);
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.ryi_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.kyj_1;
          if (charSequenceLength(this_5) === 0) {
            tmp_2 = _get_impl__d88w17_0(this).vol(strings_getInstance().cmp_1);
          } else {
            tmp_2 = null;
          }
          var tmp_3 = tmp_2;
          var tmp_4;
          // Inline function 'kotlin.text.isEmpty' call
          var this_6 = prevValue_1.lyj_1;
          if (charSequenceLength(this_6) === 0) {
            tmp_4 = _get_impl__d88w17_0(this).vol(strings_getInstance().cmp_1);
          } else {
            tmp_4 = null;
          }
          var nextValue_1 = prevValue_1.zyj(VOID, VOID, true, tmp_3, tmp_4);
          if (this_4.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
  };
  protoOf(LoginViewModel).eym = function (uiLanguage) {
    if (!uiLanguage.equals(this.ryi_1.t2().tyj_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_117();
      this.wqq(this_0, 'next');
      Companion_getInstance_117();
      this.wqq(this_0, 'learningSpaceUrl');
      Companion_getInstance_117();
      this.wqq(this_0, 'site');
      var tmp$ret$2 = this_0.f3();
      var result = tmp.rpk(uiLanguage, 'Login', this.lqp_1, tmp$ret$2);
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.ryi_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onChangeLanguage.<anonymous>' call
          var nextValue = prevValue.zyj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, uiLanguage, VOID, result.qpk_1);
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  protoOf(LoginViewModel).fym = function () {
    var tmp = this.aqq();
    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.kyj_1 = username;
    this.lyj_1 = password;
    this.myj_1 = fieldsEnabled;
    this.nyj_1 = usernameError;
    this.oyj_1 = passwordError;
    this.pyj_1 = versionInfo;
    this.qyj_1 = connectAsGuestVisible;
    this.ryj_1 = loginIntentMessage;
    this.syj_1 = errorMessage;
    this.tyj_1 = currentLanguage;
    this.uyj_1 = languageList;
    this.vyj_1 = showWaitForRestart;
    this.wyj_1 = showPoweredBy;
    this.xyj_1 = isPersonalAccount;
    this.yyj_1 = errorText;
  }
  protoOf(LoginUiState).gym = 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).zyj = function (username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText, $super) {
    username = username === VOID ? this.kyj_1 : username;
    password = password === VOID ? this.lyj_1 : password;
    fieldsEnabled = fieldsEnabled === VOID ? this.myj_1 : fieldsEnabled;
    usernameError = usernameError === VOID ? this.nyj_1 : usernameError;
    passwordError = passwordError === VOID ? this.oyj_1 : passwordError;
    versionInfo = versionInfo === VOID ? this.pyj_1 : versionInfo;
    connectAsGuestVisible = connectAsGuestVisible === VOID ? this.qyj_1 : connectAsGuestVisible;
    loginIntentMessage = loginIntentMessage === VOID ? this.ryj_1 : loginIntentMessage;
    errorMessage = errorMessage === VOID ? this.syj_1 : errorMessage;
    currentLanguage = currentLanguage === VOID ? this.tyj_1 : currentLanguage;
    languageList = languageList === VOID ? this.uyj_1 : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? this.vyj_1 : showWaitForRestart;
    showPoweredBy = showPoweredBy === VOID ? this.wyj_1 : showPoweredBy;
    isPersonalAccount = isPersonalAccount === VOID ? this.xyj_1 : isPersonalAccount;
    errorText = errorText === VOID ? this.yyj_1 : errorText;
    return $super === VOID ? this.gym(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText) : $super.gym.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.kyj_1 + ', password=' + this.lyj_1 + ', fieldsEnabled=' + this.myj_1 + ', usernameError=' + this.nyj_1 + ', passwordError=' + this.oyj_1 + ', versionInfo=' + this.pyj_1 + ', connectAsGuestVisible=' + this.qyj_1 + ', loginIntentMessage=' + this.ryj_1 + ', errorMessage=' + this.syj_1 + ', currentLanguage=' + this.tyj_1 + ', languageList=' + this.uyj_1 + ', showWaitForRestart=' + this.vyj_1 + ', showPoweredBy=' + this.wyj_1 + ', isPersonalAccount=' + this.xyj_1 + ', errorText=' + this.yyj_1 + ')';
  };
  protoOf(LoginUiState).hashCode = function () {
    var result = getStringHashCode(this.kyj_1);
    result = imul(result, 31) + getStringHashCode(this.lyj_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.myj_1) | 0;
    result = imul(result, 31) + (this.nyj_1 == null ? 0 : getStringHashCode(this.nyj_1)) | 0;
    result = imul(result, 31) + (this.oyj_1 == null ? 0 : getStringHashCode(this.oyj_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.pyj_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qyj_1) | 0;
    result = imul(result, 31) + (this.ryj_1 == null ? 0 : getStringHashCode(this.ryj_1)) | 0;
    result = imul(result, 31) + (this.syj_1 == null ? 0 : getStringHashCode(this.syj_1)) | 0;
    result = imul(result, 31) + this.tyj_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.uyj_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vyj_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wyj_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xyj_1) | 0;
    result = imul(result, 31) + (this.yyj_1 == null ? 0 : getStringHashCode(this.yyj_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.kyj_1 === tmp0_other_with_cast.kyj_1))
      return false;
    if (!(this.lyj_1 === tmp0_other_with_cast.lyj_1))
      return false;
    if (!(this.myj_1 === tmp0_other_with_cast.myj_1))
      return false;
    if (!(this.nyj_1 == tmp0_other_with_cast.nyj_1))
      return false;
    if (!(this.oyj_1 == tmp0_other_with_cast.oyj_1))
      return false;
    if (!(this.pyj_1 === tmp0_other_with_cast.pyj_1))
      return false;
    if (!(this.qyj_1 === tmp0_other_with_cast.qyj_1))
      return false;
    if (!(this.ryj_1 == tmp0_other_with_cast.ryj_1))
      return false;
    if (!(this.syj_1 == tmp0_other_with_cast.syj_1))
      return false;
    if (!this.tyj_1.equals(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 === tmp0_other_with_cast.wyj_1))
      return false;
    if (!(this.xyj_1 === tmp0_other_with_cast.xyj_1))
      return false;
    if (!(this.yyj_1 == tmp0_other_with_cast.yyj_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().mmi(_this__u8e3s4.vfl_1), Companion_getInstance_6().mmi(other.vfl_1), Companion_getInstance_9().emj());
  }
  function Companion_174() {
    Companion_instance_223 = this;
    this.hym_1 = 'ConversationList';
    this.iym_1 = 'ConversationListHome';
    this.jym_1 = listOf(['ConversationList', 'ConversationListHome']);
  }
  var Companion_instance_223;
  function Companion_getInstance_191() {
    if (Companion_instance_223 == null)
      new Companion_174();
    return Companion_instance_223;
  }
  function ConversationListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().f7f().bfl(toQueryLikeParam(this$0.nqp_1.t2().nq8_1.cq8_1), this$0.bqq());
    };
  }
  function ConversationListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.zqy();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function ConversationListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_191();
    destinationName = destinationName === VOID ? 'ConversationList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ConversationListUiState(), destinationName);
    var tmp = this;
    tmp.kyn_1 = ConversationListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_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.jqq().vol(get_dayStringResource(element));
          result.s(element, tmp$ret$0);
        }
        var tmp1_conversations = this.kyn_1;
        var nextValue = prevValue.qyn(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.nqp_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>' call
        var tmp0_searchState = this.nqz();
        var tmp1_title = this.vqz(strings_getInstance().ank_1, strings_getInstance().xnm_1);
        var tmp_0 = this.jqq().vol(strings_getInstance().bnk_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.vq8(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).yqy = function (searchText) {
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(ConversationListViewModel).zqy = function () {
    Companion_getInstance_206();
    var tmp = to('goToOnPersonSelected', 'MessageList');
    Companion_getInstance_117();
    var tmp_0 = to('listMode', ListViewMode_PICKER_getInstance().iqm_1);
    Companion_getInstance_206();
    var tmp_1 = to('excludeAlreadySelectedList', this.bqq().toString());
    Companion_getInstance_206();
    this.lqp_1.wp8('People', mapOf([tmp, tmp_0, tmp_1, to('popUpToOnPersonSelected', 'People')]));
  };
  protoOf(ConversationListViewModel).ryn = function (entry) {
    Companion_getInstance_117();
    var tmp0_safe_receiver = entry.xfm_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f96_1;
    this.lqp_1.wp8('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.fmf(), Companion_getInstance_9().emj()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.lyn_1 = conversations;
    this.myn_1 = sortOptions;
    this.nyn_1 = showAddItem;
    this.oyn_1 = localDateTimeNow;
    this.pyn_1 = dayOfWeekStrings;
  }
  protoOf(ConversationListUiState).syn = function (conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) {
    return new ConversationListUiState(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ConversationListUiState).qyn = function (conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings, $super) {
    conversations = conversations === VOID ? this.lyn_1 : conversations;
    sortOptions = sortOptions === VOID ? this.myn_1 : sortOptions;
    showAddItem = showAddItem === VOID ? this.nyn_1 : showAddItem;
    localDateTimeNow = localDateTimeNow === VOID ? this.oyn_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.pyn_1 : dayOfWeekStrings;
    return $super === VOID ? this.syn(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) : $super.syn.call(this, conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ConversationListUiState).toString = function () {
    return 'ConversationListUiState(conversations=' + this.lyn_1 + ', sortOptions=' + this.myn_1 + ', showAddItem=' + this.nyn_1 + ', localDateTimeNow=' + this.oyn_1 + ', dayOfWeekStrings=' + this.pyn_1 + ')';
  };
  protoOf(ConversationListUiState).hashCode = function () {
    var result = hashCode(this.lyn_1);
    result = imul(result, 31) + hashCode(this.myn_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nyn_1) | 0;
    result = imul(result, 31) + this.oyn_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.pyn_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.lyn_1, tmp0_other_with_cast.lyn_1))
      return false;
    if (!equals(this.myn_1, tmp0_other_with_cast.myn_1))
      return false;
    if (!(this.nyn_1 === tmp0_other_with_cast.nyn_1))
      return false;
    if (!this.oyn_1.equals(tmp0_other_with_cast.oyn_1))
      return false;
    if (!equals(this.pyn_1, tmp0_other_with_cast.pyn_1))
      return false;
    return true;
  };
  function MessageListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.byo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda$slambda$slambda).oop = function (it, $completion) {
    var tmp = this.pop(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.oop((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.byo_1.nqp_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.cyo_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.cyo_1;
              var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.ag9_1;
              var nextValue = prevValue.vq8(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).pop = function (it, completion) {
    var i = new MessageListViewModel$slambda$slambda$slambda(this.byo_1, completion);
    i.cyo_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.oop(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.lyo_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.lyo_1.fqq().n7d().qg4(this.lyo_1.myp_1);
            var tmp_1 = MessageListViewModel$slambda$slambda$slambda_0(this.lyo_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.lyo_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.nyp_1;
    ustadAccountManager$factory_2();
    return this_0.t2();
  }
  function _get_showSocialWarningUseCase__ft8jc6_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.oyp_1;
    showSocialWarningUseCase$factory_2();
    return this_0.t2();
  }
  function _get_dismissSocialWarningUseCase__st8mv5_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pyp_1;
    dismissSocialWarningUseCase$factory_2();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qyp_1;
    openExternalLinkUseCase$factory_4();
    return this_0.t2();
  }
  function Companion_175() {
    this.syp_1 = 'MessageList';
  }
  var Companion_instance_224;
  function Companion_getInstance_192() {
    return Companion_instance_224;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_32(function_0) {
    this.typ_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_32).t1d = function (value, $completion) {
    return this.typ_1(value, $completion);
  };
  function MessageListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().f7f().afl(this$0.bqq(), this$0.myp_1);
    };
  }
  function MessageListViewModel$slambda(this$0, resultContinuation) {
    this.cyq_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.cyq_1.eqy_1, MessageListViewModel$slambda$slambda_0(this.cyq_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.cyq_1, completion);
    i.dyq_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.myq_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.myq_1).bp4(toString_0(_get_ustadAccountManager__el9prc_0(this.myq_1).eoc().znw_1.g96_1));
          l$ret$1: do {
            var this_0 = this.myq_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.uyq(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.myq_1, completion);
    i.nyq_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.dyr_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.dyr_1.fqq().f7f();
            var tmp0_messageSenderPersonUid = this.dyr_1.bqq();
            var this_0 = this.dyr_1.eqy_1.t2().qyq_1;
            var tmp1_messageText = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var tmp2_messageToPersonUid = this.dyr_1.myp_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.dyr_1.eqy_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.uyq(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.dyr_1, completion);
    i.eyr_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_117();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.myp_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.nyp_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.oyp_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.pyp_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.qyp_1 = Instance(di, tmp$ret$6, null).a5d(this, openExternalLinkUseCase$factory_3());
    var tmp_8 = this;
    tmp_8.ryp_1 = MessageListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(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.eqy_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.jqq().vol(get_dayStringResource(element));
          result.s(element, tmp$ret$10);
        }
        var tmp1_messages = this.ryp_1;
        var tmp2_activePersonUid = this.bqq();
        var tmp3_showSocialWarning = _get_showSocialWarningUseCase__ft8jc6_0(this).zpb(toString_0(_get_ustadAccountManager__el9prc_0(this).eoc().znw_1.g96_1));
        var nextValue_0 = prevValue_0.uyq(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.aqq();
    launch(tmp_9, VOID, VOID, MessageListViewModel$slambda_0(this, null));
  }
  protoOf(MessageListViewModel).dtz = function () {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, MessageListViewModel$onWarningDismiss$slambda_0(this, null));
  };
  protoOf(MessageListViewModel).yqy = function (searchText) {
    // Inline function 'kotlin.TODO' call
    var reason = 'Not yet implemented';
    throw new NotImplementedError('An operation is not implemented: ' + reason);
  };
  protoOf(MessageListViewModel).zqy = function () {
  };
  protoOf(MessageListViewModel).fyr = function (text) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.onChangeNewMessageText.<anonymous>' call
        var nextValue = prevValue.uyq(VOID, VOID, text);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(MessageListViewModel).xsu = function () {
    var tmp = this.aqq();
    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.fmf(), Companion_getInstance_9().emj()) : localDateTimeNow;
    showSocialWarning = showSocialWarning === VOID ? true : showSocialWarning;
    this.oyq_1 = messages;
    this.pyq_1 = activePersonUid;
    this.qyq_1 = newMessageText;
    this.ryq_1 = dayOfWeekStrings;
    this.syq_1 = localDateTimeNow;
    this.tyq_1 = showSocialWarning;
  }
  protoOf(MessageListUiState).gyr = function (messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) {
    return new MessageListUiState(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning);
  };
  protoOf(MessageListUiState).uyq = function (messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning, $super) {
    messages = messages === VOID ? this.oyq_1 : messages;
    activePersonUid = activePersonUid === VOID ? this.pyq_1 : activePersonUid;
    newMessageText = newMessageText === VOID ? this.qyq_1 : newMessageText;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.ryq_1 : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.syq_1 : localDateTimeNow;
    showSocialWarning = showSocialWarning === VOID ? this.tyq_1 : showSocialWarning;
    return $super === VOID ? this.gyr(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) : $super.gyr.call(this, messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning);
  };
  protoOf(MessageListUiState).toString = function () {
    return 'MessageListUiState(messages=' + this.oyq_1 + ', activePersonUid=' + this.pyq_1.toString() + ', newMessageText=' + this.qyq_1 + ', dayOfWeekStrings=' + this.ryq_1 + ', localDateTimeNow=' + this.syq_1 + ', showSocialWarning=' + this.tyq_1 + ')';
  };
  protoOf(MessageListUiState).hashCode = function () {
    var result = hashCode(this.oyq_1);
    result = imul(result, 31) + this.pyq_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.qyq_1) | 0;
    result = imul(result, 31) + hashCode(this.ryq_1) | 0;
    result = imul(result, 31) + this.syq_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tyq_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.oyq_1, tmp0_other_with_cast.oyq_1))
      return false;
    if (!this.pyq_1.equals(tmp0_other_with_cast.pyq_1))
      return false;
    if (!(this.qyq_1 === tmp0_other_with_cast.qyq_1))
      return false;
    if (!equals(this.ryq_1, tmp0_other_with_cast.ryq_1))
      return false;
    if (!this.syq_1.equals(tmp0_other_with_cast.syq_1))
      return false;
    if (!(this.tyq_1 === tmp0_other_with_cast.tyq_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.hyr_1 = title;
    this.iyr_1 = langCode;
  }
  protoOf(TitleAndLangCode).toString = function () {
    return 'TitleAndLangCode(title=' + this.hyr_1 + ', langCode=' + this.iyr_1 + ')';
  };
  protoOf(TitleAndLangCode).hashCode = function () {
    var result = getStringHashCode(this.hyr_1);
    result = imul(result, 31) + getStringHashCode(this.iyr_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.hyr_1 === tmp0_other_with_cast.hyr_1))
      return false;
    if (!(this.iyr_1 === tmp0_other_with_cast.iyr_1))
      return false;
    return true;
  };
  function _get_statementRecorder__l4o9jw($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pyh_1;
    statementRecorder$factory();
    return this_0.t2();
  }
  function AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda$lambda(this$0) {
    return function () {
      var titleAndLangCodeVal = this$0.lyg();
      var tmp = this$0.oyh_1.zk0_1;
      var tmp_0;
      if (!(titleAndLangCodeVal == null)) {
        tmp_0 = mapOf_0(to(titleAndLangCodeVal.iyr_1, titleAndLangCodeVal.hyr_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.bqr(this$0.nyh_1);
      var tmp_0 = this$0.aqq();
      return this$0.myh_1.wq5(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.myh_1 = tmp_0.d58(tmp$ret$0, null);
    var tmp_2 = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('entryid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_2.nyh_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.oyh_1 = this.bqr(this.nyh_1);
    var tmp_3 = this;
    tmp_3.pyh_1 = lazy_0(AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda(this));
  }
  protoOf(AbstractNonInteractiveContentViewModel).pq5 = function (oneCompletionStatementOnly) {
    _get_statementRecorder__l4o9jw(this).pq5(oneCompletionStatementOnly);
  };
  protoOf(AbstractNonInteractiveContentViewModel).qyh = function (oneCompletionStatementOnly, $super) {
    oneCompletionStatementOnly = oneCompletionStatementOnly === VOID ? false : oneCompletionStatementOnly;
    var tmp;
    if ($super === VOID) {
      this.pq5(oneCompletionStatementOnly);
      tmp = Unit_instance;
    } else {
      tmp = $super.pq5.call(this, oneCompletionStatementOnly);
    }
    return tmp;
  };
  protoOf(AbstractNonInteractiveContentViewModel).oq5 = function (progress) {
    _get_statementRecorder__l4o9jw(this).oq5(progress);
  };
  protoOf(AbstractNonInteractiveContentViewModel).bq5 = function (active) {
    _get_statementRecorder__l4o9jw(this).bq5(active);
  };
  protoOf(AbstractNonInteractiveContentViewModel).bm9 = function () {
    _get_statementRecorder__l4o9jw(this).bm9();
    protoOf(UstadViewModel).bm9.call(this);
  };
  protoOf(AbstractNonInteractiveContentViewModel).rq5 = function () {
    _get_statementRecorder__l4o9jw(this).rq5();
  };
  function statementRecorder$factory() {
    return getPropertyCallableRef('statementRecorder', 1, KProperty1, function (receiver) {
      return _get_statementRecorder__l4o9jw(receiver);
    }, null);
  }
  function Companion_176() {
    this.jyr_1 = 'ParentConsentWaitingScreen';
  }
  var Companion_instance_225;
  function Companion_getInstance_193() {
    return Companion_instance_225;
  }
  function ParentConsentWaitingScreenViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'ParentConsentWaitingScreen');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentConsentWaitingScreenViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, VOID, false, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  function ParentalConsentManagementViewModel$lambda$slambda$slambda(this$0, resultContinuation) {
    this.syr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).uyr = function (db, $completion) {
    var tmp = this.jo1(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.uyr(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.tyr_1.x7e().vgs(this.syr_1.rqv_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.egu_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.syr_1.bqq()) : 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).jo1 = function (db, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda(this.syr_1, completion);
    i.tyr_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.uyr(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).dys = 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.dys($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.dys($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.byt_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var currentJoin = it == null ? null : it.egu_1;
          var tmp2_safe_receiver = it == null ? null : it.fgu_1;
          var gender = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.l96_1;
          var tmp;
          if (!(currentJoin == null) ? currentJoin.gg8_1 === 0 : false) {
            var tmp_0;
            if (gender === 2) {
              tmp_0 = 2;
            } else {
              if (gender === 1) {
                tmp_0 = 1;
              } else {
                tmp_0 = 4;
              }
            }
            var defaultRelationship = tmp_0;
            tmp = currentJoin.skt(VOID, VOID, VOID, VOID, VOID, VOID, VOID, defaultRelationship);
          } else {
            tmp = currentJoin;
          }
          var updatedJoin = tmp;
          var nextValue = prevValue.jyt(it == null ? null : it.wkt(updatedJoin));
          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.dyt_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.byt_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.updateStatus.<anonymous>' call
        var tmp1_safe_receiver = prevValue.eyt_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.eyt_1.egu_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.wkt(tmp_0);
        }
        var nextValue = prevValue.jyt(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.eyt_1;
    var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.egu_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.aqq();
      launch(tmp_1, VOID, VOID, ParentalConsentManagementViewModel$updateStatus$slambda_0($this, tmp1_safe_receiver_0, null));
    }
    $this.hqq().kq9(new Snack($this.jqq().vol(strings_getInstance().gnh_1)));
  }
  function Companion_177() {
    this.kyt_1 = 'ParentalConsentManagement';
  }
  var Companion_instance_226;
  function Companion_getInstance_194() {
    return Companion_instance_226;
  }
  function ParentalConsentManagementViewModel$lambda$slambda(this$0, resultContinuation) {
    this.tyt_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.tyt_1, null);
            var tmp_2 = ParentalConsentManagementViewModel$lambda$slambda$slambda_2(null);
            suspendResult = this.tyt_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, ParentalConsentManagementViewModel$lambda$slambda$lambda(this.tyt_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.tyt_1.byt_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jyt(VOID, VOID, VOID, !(prevValue.eyt_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.tyt_1, completion);
    i.uyt_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.dyu_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.fyu_1 = this.dyu_1.fqq().w7e();
            this.hd_1 = 1;
            suspendResult = _get_getLocaleForSiteTermsUseCase__hxw5id(this.dyu_1).vpo(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.gyu_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.fyu_1.oht(this.gyu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var terms = suspendResult;
            l$ret$1: do {
              var this_0 = this.dyu_1.byt_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jyt(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.dyu_1, completion);
    i.eyu_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.nqp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.vq8(VOID, VOID, this$0.jqq().vol(strings_getInstance().xnc_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      var tmp = this$0.aqq();
      launch(tmp, VOID, VOID, ParentalConsentManagementViewModel$lambda$slambda_0(this$0, null));
      var tmp_0 = this$0.aqq();
      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.bqq();
      $this$shallowCopy.lg8_1 = systemTimeInMillis();
      return Unit_instance;
    };
  }
  function ParentalConsentManagementViewModel$updateStatus$slambda(this$0, $personParentJoin, resultContinuation) {
    this.pyu_1 = this$0;
    this.qyu_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.pyu_1.fqq().x7e().xgs(this.qyu_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.pyu_1, this.qyu_1, completion);
    i.ryu_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.byt_1 = MutableStateFlow(new ParentalConsentManagementUiState());
    this.cyt_1 = asStateFlow(this.byt_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.zqp().voc();
    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.dyt_1 = Instance(this_0, tmp$ret$3, null).a5d(this, getLocaleForSiteTermsUseCase$factory());
    Companion_getInstance_126();
    var tmp_3 = mapOf_0(to('entityUid', this.rqv_1.toString()));
    this.yqq(true, tmp_3, ParentalConsentManagementViewModel$lambda(this));
  }
  protoOf(ParentalConsentManagementViewModel).syu = function (personParentJoin) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.byt_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.eyt_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wkt(personParentJoin);
        var tmp1_safe_receiver = prevValue.eyt_1;
        var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.egu_1;
        var tmp_0 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.gg8_1;
        var nextValue = prevValue.jyt(tmp, this.uqw(tmp_0, personParentJoin == null ? null : personParentJoin.gg8_1, prevValue.fyt_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ParentalConsentManagementViewModel).tyu = function () {
    var tmp0_safe_receiver = this.byt_1.t2().eyt_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.egu_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.byt_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onClickConsent.<anonymous>' call
          var nextValue = prevValue.jyt(VOID, this.jqq().vol(strings_getInstance().cmp_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    updateStatus(this, 1);
  };
  protoOf(ParentalConsentManagementViewModel).uyu = function () {
    updateStatus(this, 2);
  };
  protoOf(ParentalConsentManagementViewModel).vyu = function () {
    var tmp0_safe_receiver = this.byt_1.t2().eyt_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.egu_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.eyt_1 = parentJoinAndMinor;
    this.fyt_1 = relationshipError;
    this.gyt_1 = siteTerms;
    this.hyt_1 = fieldsEnabled;
    this.iyt_1 = appName;
  }
  protoOf(ParentalConsentManagementUiState).wyu = function () {
    var tmp0_safe_receiver = this.eyt_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.egu_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.eg8_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).xyu = function () {
    var tmp0_safe_receiver = this.eyt_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.egu_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.eg8_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).yyu = function () {
    var tmp0_safe_receiver = this.eyt_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.egu_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.eg8_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).zyu = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.eyt_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.egu_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).ayv = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.eyt_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.egu_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).byv = function () {
    var tmp0_safe_receiver = this.eyt_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.egu_1;
    var tmp2_subject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.kg8_1;
    var tmp;
    if (tmp2_subject === 1) {
      tmp = strings_getInstance().unc_1;
    } else {
      if (tmp2_subject === 2) {
        tmp = strings_getInstance().vnc_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  };
  protoOf(ParentalConsentManagementUiState).cyv = function () {
    var tmp0_safe_receiver = this.eyt_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.egu_1;
    var tmp2_subject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.kg8_1;
    var tmp;
    if (tmp2_subject === 1) {
      tmp = strings_getInstance().snc_1;
    } else {
      if (tmp2_subject === 2) {
        tmp = strings_getInstance().tnc_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  };
  protoOf(ParentalConsentManagementUiState).dyv = function (parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) {
    return new ParentalConsentManagementUiState(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName);
  };
  protoOf(ParentalConsentManagementUiState).jyt = function (parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName, $super) {
    parentJoinAndMinor = parentJoinAndMinor === VOID ? this.eyt_1 : parentJoinAndMinor;
    relationshipError = relationshipError === VOID ? this.fyt_1 : relationshipError;
    siteTerms = siteTerms === VOID ? this.gyt_1 : siteTerms;
    fieldsEnabled = fieldsEnabled === VOID ? this.hyt_1 : fieldsEnabled;
    appName = appName === VOID ? this.iyt_1 : appName;
    return $super === VOID ? this.dyv(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) : $super.dyv.call(this, parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName);
  };
  protoOf(ParentalConsentManagementUiState).toString = function () {
    return 'ParentalConsentManagementUiState(parentJoinAndMinor=' + this.eyt_1 + ', relationshipError=' + this.fyt_1 + ', siteTerms=' + this.gyt_1 + ', fieldsEnabled=' + this.hyt_1 + ', appName=' + this.iyt_1 + ')';
  };
  protoOf(ParentalConsentManagementUiState).hashCode = function () {
    var result = this.eyt_1 == null ? 0 : this.eyt_1.hashCode();
    result = imul(result, 31) + (this.fyt_1 == null ? 0 : getStringHashCode(this.fyt_1)) | 0;
    result = imul(result, 31) + (this.gyt_1 == null ? 0 : hashCode(this.gyt_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hyt_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.iyt_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.eyt_1, tmp0_other_with_cast.eyt_1))
      return false;
    if (!(this.fyt_1 == tmp0_other_with_cast.fyt_1))
      return false;
    if (!equals(this.gyt_1, tmp0_other_with_cast.gyt_1))
      return false;
    if (!(this.hyt_1 === tmp0_other_with_cast.hyt_1))
      return false;
    if (!(this.iyt_1 === tmp0_other_with_cast.iyt_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.gyw_1;
    httpClient$factory_10();
    return this_0.t2();
  }
  function Companion_178() {
    this.hyw_1 = 'PdfContent';
  }
  var Companion_instance_227;
  function Companion_getInstance_195() {
    return Companion_instance_227;
  }
  function PdfContentViewModel$slambda(this$0, resultContinuation) {
    this.qyw_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.qyw_1.fqq().i7f().fbq(this.qyw_1.dyw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_0.tyw_1 = tmp_1;
            this.uyw_1 = ensureNotNull(this.tyw_1.pax_1);
            var tmp_2 = this;
            tmp_2.vyw_1 = this.qyw_1.m4r();
            var tmp_3 = this;
            tmp_3.wyw_1 = _get_httpClient__2ty1zc_4(this.qyw_1);
            var tmp_4 = this;
            tmp_4.xyw_1 = this.uyw_1;
            var tmp_5 = this;
            tmp_5.yyw_1 = this.wyw_1;
            var tmp_6 = this;
            tmp_6.zyw_1 = this.yyw_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.xyw_1);
            tmp_7.ayx_1 = this_0;
            this.ayx_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.byx_1 = this.zyw_1;
            var tmp_9 = this;
            tmp_9.cyx_1 = this.ayx_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.cyx_1, this.byx_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 3:
            this.eyx_1 = suspendResult;
            var tmp_10 = this;
            var this_1 = this.vyw_1.t45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_10.fyx_1 = this.vyw_1.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.eyx_1);
            var tmp_11 = this;
            var tmp1_elvis_lhs = this.tyw_1.nax_1;
            var tmp_12;
            if (tmp1_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_12 = tmp1_elvis_lhs;
            }

            tmp_11.gyx_1 = tmp_12;
            this.hyx_1 = UrlKmp(this.uyw_1).sp4(this.gyx_1).toString();
            this.iyx_1 = bodyDataUrlForUri(this.fyx_1, this.gyx_1);
            l$ret$1: do {
              var this_3 = this.qyw_1.eyw_1;
              while (true) {
                var prevValue = this_3.t2();
                var nextValue = prevValue.myx(this.hyx_1, this.iyx_1);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 4;
            suspendResult = this.qyw_1.fqq().v7d().rau(this.tyw_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.qyw_1.nqp_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.vq8(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.qyw_1, completion);
    i.ryw_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_117();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.dyw_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.eyw_1 = MutableStateFlow(new PdfContentUiState());
    this.fyw_1 = asStateFlow(this.eyw_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.gyw_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.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.pdfcontent.PdfContentViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.aqq();
    launch(tmp_2, VOID, VOID, PdfContentViewModel$slambda_0(this, null));
  }
  protoOf(PdfContentViewModel).lyg = function () {
    var tmp0_safe_receiver = this.eyw_1.t2().lyx_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.jyx_1 = pdfUrl;
    this.kyx_1 = dataUrl;
    this.lyx_1 = contentEntry;
  }
  protoOf(PdfContentUiState).nyx = function (pdfUrl, dataUrl, contentEntry) {
    return new PdfContentUiState(pdfUrl, dataUrl, contentEntry);
  };
  protoOf(PdfContentUiState).myx = function (pdfUrl, dataUrl, contentEntry, $super) {
    pdfUrl = pdfUrl === VOID ? this.jyx_1 : pdfUrl;
    dataUrl = dataUrl === VOID ? this.kyx_1 : dataUrl;
    contentEntry = contentEntry === VOID ? this.lyx_1 : contentEntry;
    return $super === VOID ? this.nyx(pdfUrl, dataUrl, contentEntry) : $super.nyx.call(this, pdfUrl, dataUrl, contentEntry);
  };
  protoOf(PdfContentUiState).toString = function () {
    return 'PdfContentUiState(pdfUrl=' + this.jyx_1 + ', dataUrl=' + this.kyx_1 + ', contentEntry=' + this.lyx_1 + ')';
  };
  protoOf(PdfContentUiState).hashCode = function () {
    var result = this.jyx_1 == null ? 0 : getStringHashCode(this.jyx_1);
    result = imul(result, 31) + (this.kyx_1 == null ? 0 : getStringHashCode(this.kyx_1)) | 0;
    result = imul(result, 31) + (this.lyx_1 == null ? 0 : this.lyx_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.jyx_1 == tmp0_other_with_cast.jyx_1))
      return false;
    if (!(this.kyx_1 == tmp0_other_with_cast.kyx_1))
      return false;
    if (!equals(this.lyx_1, tmp0_other_with_cast.lyx_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.oyx_1 = 'goToOnPersonSelected';
    this.pyx_1 = 'popUpToOnPersonSelected';
  }
  var PersonViewModelConstants_instance;
  function PersonViewModelConstants_getInstance() {
    return PersonViewModelConstants_instance;
  }
  function PersonAccountEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.yyx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda$slambda).byy = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.byy(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.zyx_1.n7d().mg4(this.yyx_1.rqv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ayy_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = this.zyx_1.p7f();
            var tmp_1 = this.yyx_1.bqq();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.yi1(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.ayy_1 == null) {
              tmp_2 = null;
            } else {
              var tmp_3 = this.ayy_1.g96_1 == null ? 1 : hasResetPermission ? 2 : 3;
              var tmp_4 = this.ayy_1.f96_1;
              var tmp0_elvis_lhs = this.ayy_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).jo1 = function (db, completion) {
    var i = new PersonAccountEditViewModel$slambda$slambda(this.yyx_1, completion);
    i.zyx_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.byy(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).kyy = 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.kyy($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.kyy($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.iyz_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.uyz(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonAccountEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function PersonAccountEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.dz0_1 = this$0;
    this.ez0_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(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.io1(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.dz0_1).cnv(this.dz0_1.rqv_1, this.ez0_1.kz0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.dz0_1.fqq().n7d().sg4(this.dz0_1.rqv_1, this.ez0_1.iz0_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).jo1 = function (it, completion) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda$slambda(this.dz0_1, this.ez0_1, completion);
    i.fz0_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_authManager__mo6de4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kyz_1;
    authManager$factory_0();
    return this_0.t2();
  }
  function _get_setPasswordUseCase__c0ja9b($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lyz_1;
    setPasswordUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_179() {
    this.lz0_1 = 'AccountEdit';
    this.mz0_1 = 1;
    this.nz0_1 = 2;
    this.oz0_1 = 3;
  }
  var Companion_instance_228;
  function Companion_getInstance_196() {
    return Companion_instance_228;
  }
  function PersonAccountEditViewModel$slambda(this$0, resultContinuation) {
    this.xz0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda).hsg = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda).he = function (p1, $completion) {
    return this.hsg(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.xz0_1.rqv_1.equals(this.xz0_1.bqq())) {
              var tmp_0 = this;
              tmp_0.zz0_1 = true;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_1 = this.yz0_1.p7f();
              var tmp_2 = this.xz0_1.bqq();
              PermissionFlags_getInstance();
              suspendResult = tmp_1.yi1(tmp_2, new Long(32768, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.zz0_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.zz0_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).jo1 = function (db, completion) {
    var i = new PersonAccountEditViewModel$slambda(this.xz0_1, completion);
    i.yz0_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.hsg(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$slambda_1(this$0, resultContinuation) {
    this.iz1_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_229.n4r();
            var tmp_1 = PersonAccountEditViewModel$slambda$slambda_0(this.iz1_1, null);
            var tmp_2 = PersonAccountEditViewModel$slambda$slambda_2(null);
            suspendResult = this.iz1_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, PersonAccountEditViewModel$slambda$lambda(this.iz1_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.iz1_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.iz1_1.jqq().vol(strings_getInstance().on4_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_3, VOID, PersonAccountEditViewModel$onClickSave$ref(this.iz1_1));
                var tmp1_loadingState = Companion_getInstance_98().dq9_1;
                var nextValue = prevValue.vq8(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.iz1_1.iyz_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.uyz(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.iz1_1, completion);
    i.jz1_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.sz1_1 = $commitDelay;
    this.tz1_1 = $entity;
    this.uz1_1 = $this;
    this.vz1_1 = $key;
    this.wz1_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.sz1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.tz1_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.uz1_1.pqq(this.uz1_1.jqp_1, this.vz1_1, this.wz1_1, this.tz1_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.sz1_1, this.tz1_1, this.uz1_1, this.vz1_1, this.wz1_1, completion);
    i.xz1_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.gz2_1 = $entity;
    this.hz2_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.gz2_1.gz0_1 === 1) {
              var validationResult = this.hz2_1.myz_1.zpb(this.gz2_1.iz0_1);
              this.hz2_1.lqq(Companion_getInstance_98().dq9_1);
              if (!validationResult.equals(Companion_getInstance_75().ypq_1)) {
                l$ret$1: do {
                  var this_0 = this.hz2_1.iyz_1;
                  while (true) {
                    var prevValue = this_0.t2();
                    var tmp0_safe_receiver = validationResult.dpr_1;
                    var tmp_0;
                    if (tmp0_safe_receiver == null) {
                      tmp_0 = null;
                    } else {
                      tmp_0 = this.hz2_1.jqq().vol(tmp0_safe_receiver);
                    }
                    var tmp1_usernameError = tmp_0;
                    var nextValue = prevValue.uyz(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.gz2_1.kz0_1)) {
              l$ret$3: do {
                var this_1 = this.hz2_1.iyz_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.uyz(VOID, VOID, VOID, this.hz2_1.jqq().vol(strings_getInstance().cmp_1));
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            if (this.gz2_1.gz0_1 === 3 ? isBlank(this.gz2_1.jz0_1) : false)
              if (this.hz2_1.iyz_1.t2().mu8()) {
                this.hz2_1.lqq(Companion_getInstance_98().dq9_1);
                l$ret$5: do {
                  var this_2 = this.hz2_1.iyz_1;
                  while (true) {
                    var prevValue_1 = this_2.t2();
                    var nextValue_1 = prevValue_1.uyz(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.gz2_1.gz0_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.hz2_1).uok(this.hz2_1.bqq(), this.gz2_1.hz0_1, this.gz2_1.iz0_1, this.gz2_1.kz0_1, this.gz2_1.gz0_1 === 3 ? this.gz2_1.jz0_1 : null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hz2_1.hqq().kq9(new Snack(this.hz2_1.jqq().vol(strings_getInstance().unn_1)));
            var tmp_1 = this;
            this.hz2_1.uqv(null);
            tmp_1.kz2_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.lz2_1 = this.kd_1;
              var tmp_3 = this;
              var tmp_4;
              var tmp_5 = this.lz2_1;
              if (tmp_5 instanceof UnauthorizedException) {
                l$ret$19: do {
                  var this_3 = this.hz2_1.iyz_1;
                  while (true) {
                    var prevValue_2 = this_3.t2();
                    var nextValue_2 = prevValue_2.uyz(VOID, VOID, this.hz2_1.jqq().vol(strings_getInstance().gmk_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.hz2_1.iyz_1;
                  while (true) {
                    var prevValue_3 = this_4.t2();
                    var nextValue_3 = prevValue_3.uyz(VOID, VOID, VOID, VOID, this.lz2_1.message);
                    if (this_4.y1k(prevValue_3, nextValue_3)) {
                      break l$ret$21;
                    }
                  }
                }
                 while (false);
                tmp_4 = Unit_instance;
              }
              tmp_3.kz2_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.mz2_1 = this.kd_1;
            this.hz2_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$23: do {
              var this_5 = this.hz2_1.iyz_1;
              while (true) {
                var prevValue_4 = this_5.t2();
                var nextValue_4 = prevValue_4.uyz(VOID, VOID, VOID, VOID, VOID, true);
                if (this_5.y1k(prevValue_4, nextValue_4)) {
                  break l$ret$23;
                }
              }
            }
             while (false);
            throw this.mz2_1;
          case 5:
            this.id_1 = 14;
            this.hz2_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$25: do {
              var this_6 = this.hz2_1.iyz_1;
              while (true) {
                var prevValue_5 = this_6.t2();
                var nextValue_5 = prevValue_5.uyz(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.hz2_1.fqq().n7d().kg4(this.gz2_1.iz0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.nz2_1 = suspendResult;
            if (this.nz2_1 === 0) {
              this.hd_1 = 8;
              var tmp_6 = this.hz2_1.fqq();
              suspendResult = withDoorTransactionAsync(tmp_6, VOID, PersonAccountEditViewModel$onClickSave$slambda$slambda_0(this.hz2_1, this.gz2_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              l$ret$7: do {
                var this_7 = this.hz2_1.iyz_1;
                while (true) {
                  var prevValue_6 = this_7.t2();
                  var nextValue_6 = prevValue_6.uyz(VOID, this.hz2_1.jqq().vol(strings_getInstance().fn9_1));
                  if (this_7.y1k(prevValue_6, nextValue_6)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              this.hd_1 = 9;
              continue $sm;
            }

          case 8:
            this.hz2_1.uqv(null);
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.jz2_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.hz2_1.iyz_1;
                while (true) {
                  var prevValue_7 = this_8.t2();
                  var nextValue_7 = prevValue_7.uyz(VOID, this.hz2_1.jqq().vol(strings_getInstance().hmk_1));
                  if (this_8.y1k(prevValue_7, nextValue_7)) {
                    break l$ret$11;
                  }
                }
              }
               while (false);
              tmp_8.jz2_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.hz2_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$13: do {
              var this_9 = this.hz2_1.iyz_1;
              while (true) {
                var prevValue_8 = this_9.t2();
                var nextValue_8 = prevValue_8.uyz(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.hz2_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$15: do {
              var this_10 = this.hz2_1.iyz_1;
              while (true) {
                var prevValue_9 = this_10.t2();
                var nextValue_9 = prevValue_9.uyz(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.gz2_1, this.hz2_1, completion);
    i.iz2_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.iyz_1 = MutableStateFlow(new PersonAccountEditUiState());
    this.jyz_1 = asStateFlow(this.iyz_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.zqp().voc();
    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.kyz_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.zqp().voc();
    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.lyz_1 = Instance(this_1, tmp$ret$8, null).a5d(this, setPasswordUseCase$factory());
    this.myz_1 = new ValidateUsernameUseCase();
    this.nyz_1 = new FilterUsernameUseCase();
    this.nqp_1.x1k(new AppUiState(VOID, Companion_getInstance_98().cq9_1));
    var tmp_7 = PersonAccountEditViewModel$slambda_0(this, null);
    this.vqq(tmp_7, VOID, VOID, PersonAccountEditViewModel$slambda_2(this, null));
  }
  protoOf(PersonAccountEditViewModel).oz2 = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.iyz_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.iz0_1;
        var tmp1_safe_receiver = this.iyz_1.t2().oyz_1;
        if (!(tmp_0 == (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.iz0_1))) {
          tmp = entity == null ? null : entity.pz2(VOID, VOID, this.nyz_1.ypg(entity.iz0_1, ''));
        } else {
          tmp = entity;
        }
        var tmp_1 = tmp;
        var tmp_2;
        var tmp_3;
        if (!(prevValue.pyz_1 == null)) {
          var tmp3_safe_receiver = prevValue.oyz_1;
          var tmp_4 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.iz0_1;
          tmp_3 = tmp_4 == (entity == null ? null : entity.iz0_1);
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.pyz_1;
        } else {
          tmp_2 = null;
        }
        var tmp_5 = tmp_2;
        var tmp_6;
        var tmp_7;
        if (!(prevValue.qyz_1 == null)) {
          var tmp5_safe_receiver = prevValue.oyz_1;
          var tmp_8 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.jz0_1;
          tmp_7 = tmp_8 == (entity == null ? null : entity.jz0_1);
        } else {
          tmp_7 = false;
        }
        if (tmp_7) {
          tmp_6 = prevValue.qyz_1;
        } else {
          tmp_6 = null;
        }
        var tmp_9 = tmp_6;
        var tmp_10;
        var tmp_11;
        if (!(prevValue.ryz_1 == null)) {
          var tmp7_safe_receiver = prevValue.oyz_1;
          var tmp_12 = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.kz0_1;
          tmp_11 = tmp_12 == (entity == null ? null : entity.kz0_1);
        } else {
          tmp_11 = false;
        }
        if (tmp_11) {
          tmp_10 = prevValue.ryz_1;
        } else {
          tmp_10 = null;
        }
        var nextValue = prevValue.uyz(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_229.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_126();
    var key = 'entityState';
    var tmp0_safe_receiver = this.qqv_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_13 = this;
    var tmp_14 = this.aqq();
    tmp_13.qqv_1 = launch(tmp_14, VOID, VOID, PersonAccountEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(PersonAccountEditViewModel).vsd = function () {
    if (this.mqq().equals(Companion_getInstance_98().cq9_1))
      return Unit_instance;
    var tmp0_elvis_lhs = this.iyz_1.t2().oyz_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var entity = tmp;
    this.lqq(Companion_getInstance_98().cq9_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.iyz_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.uyz(VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.aqq();
    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.oyz_1 = personAccount;
    this.pyz_1 = usernameError;
    this.qyz_1 = currentPasswordError;
    this.ryz_1 = newPasswordError;
    this.syz_1 = errorMessage;
    this.tyz_1 = fieldsEnabled;
  }
  protoOf(PersonAccountEditUiState).qz2 = function () {
    var tmp0_safe_receiver = this.oyz_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gz0_1) === 1;
  };
  protoOf(PersonAccountEditUiState).rz2 = function () {
    var tmp0_safe_receiver = this.oyz_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gz0_1) === 3;
  };
  protoOf(PersonAccountEditUiState).mu8 = function () {
    return (!(this.pyz_1 == null) ? true : !(this.qyz_1 == null)) ? true : !(this.ryz_1 == null);
  };
  protoOf(PersonAccountEditUiState).sz2 = function (personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) {
    return new PersonAccountEditUiState(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled);
  };
  protoOf(PersonAccountEditUiState).uyz = function (personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled, $super) {
    personAccount = personAccount === VOID ? this.oyz_1 : personAccount;
    usernameError = usernameError === VOID ? this.pyz_1 : usernameError;
    currentPasswordError = currentPasswordError === VOID ? this.qyz_1 : currentPasswordError;
    newPasswordError = newPasswordError === VOID ? this.ryz_1 : newPasswordError;
    errorMessage = errorMessage === VOID ? this.syz_1 : errorMessage;
    fieldsEnabled = fieldsEnabled === VOID ? this.tyz_1 : fieldsEnabled;
    return $super === VOID ? this.sz2(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) : $super.sz2.call(this, personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled);
  };
  protoOf(PersonAccountEditUiState).toString = function () {
    return 'PersonAccountEditUiState(personAccount=' + this.oyz_1 + ', usernameError=' + this.pyz_1 + ', currentPasswordError=' + this.qyz_1 + ', newPasswordError=' + this.ryz_1 + ', errorMessage=' + this.syz_1 + ', fieldsEnabled=' + this.tyz_1 + ')';
  };
  protoOf(PersonAccountEditUiState).hashCode = function () {
    var result = this.oyz_1 == null ? 0 : this.oyz_1.hashCode();
    result = imul(result, 31) + (this.pyz_1 == null ? 0 : getStringHashCode(this.pyz_1)) | 0;
    result = imul(result, 31) + (this.qyz_1 == null ? 0 : getStringHashCode(this.qyz_1)) | 0;
    result = imul(result, 31) + (this.ryz_1 == null ? 0 : getStringHashCode(this.ryz_1)) | 0;
    result = imul(result, 31) + (this.syz_1 == null ? 0 : getStringHashCode(this.syz_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tyz_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.oyz_1, tmp0_other_with_cast.oyz_1))
      return false;
    if (!(this.pyz_1 == tmp0_other_with_cast.pyz_1))
      return false;
    if (!(this.qyz_1 == tmp0_other_with_cast.qyz_1))
      return false;
    if (!(this.ryz_1 == tmp0_other_with_cast.ryz_1))
      return false;
    if (!(this.syz_1 == tmp0_other_with_cast.syz_1))
      return false;
    if (!(this.tyz_1 === tmp0_other_with_cast.tyz_1))
      return false;
    return true;
  };
  function Companion_180() {
  }
  protoOf(Companion_180).n4r = function () {
    return $serializer_getInstance_77();
  };
  var Companion_instance_229;
  function Companion_getInstance_197() {
    return Companion_instance_229;
  }
  function $serializer_65() {
    $serializer_instance_65 = 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.tz2_1 = tmp0_serialDesc;
  }
  protoOf($serializer_65).q44 = function () {
    return this.tz2_1;
  };
  protoOf($serializer_65).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_65).s44 = function (decoder) {
    var tmp0_desc = this.tz2_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_65).uz2 = function (encoder, value) {
    var tmp0_desc = this.tz2_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.gz0_1 === 1)) {
      tmp1_output.r49(tmp0_desc, 0, value.gz0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !value.hz0_1.equals(new Long(0, 0))) {
      tmp1_output.s49(tmp0_desc, 1, value.hz0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.iz0_1 === '')) {
      tmp1_output.w49(tmp0_desc, 2, value.iz0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.jz0_1 === '')) {
      tmp1_output.w49(tmp0_desc, 3, value.jz0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.kz0_1 === '')) {
      tmp1_output.w49(tmp0_desc, 4, value.kz0_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_65).r44 = function (encoder, value) {
    return this.uz2(encoder, value instanceof PersonUsernameAndPasswordModel ? value : THROW_CCE());
  };
  var $serializer_instance_65;
  function $serializer_getInstance_77() {
    if ($serializer_instance_65 == null)
      new $serializer_65();
    return $serializer_instance_65;
  }
  function PersonUsernameAndPasswordModel_init_$Init$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_77().tz2_1);
    }
    if (0 === (seen1 & 1))
      $this.gz0_1 = 1;
    else
      $this.gz0_1 = mode;
    if (0 === (seen1 & 2))
      $this.hz0_1 = new Long(0, 0);
    else
      $this.hz0_1 = personUid;
    if (0 === (seen1 & 4))
      $this.iz0_1 = '';
    else
      $this.iz0_1 = username;
    if (0 === (seen1 & 8))
      $this.jz0_1 = '';
    else
      $this.jz0_1 = currentPassword;
    if (0 === (seen1 & 16))
      $this.kz0_1 = '';
    else
      $this.kz0_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.gz0_1 = mode;
    this.hz0_1 = personUid;
    this.iz0_1 = username;
    this.jz0_1 = currentPassword;
    this.kz0_1 = newPassword;
  }
  protoOf(PersonUsernameAndPasswordModel).vz2 = function (mode, personUid, username, currentPassword, newPassword) {
    return new PersonUsernameAndPasswordModel(mode, personUid, username, currentPassword, newPassword);
  };
  protoOf(PersonUsernameAndPasswordModel).pz2 = function (mode, personUid, username, currentPassword, newPassword, $super) {
    mode = mode === VOID ? this.gz0_1 : mode;
    personUid = personUid === VOID ? this.hz0_1 : personUid;
    username = username === VOID ? this.iz0_1 : username;
    currentPassword = currentPassword === VOID ? this.jz0_1 : currentPassword;
    newPassword = newPassword === VOID ? this.kz0_1 : newPassword;
    return $super === VOID ? this.vz2(mode, personUid, username, currentPassword, newPassword) : $super.vz2.call(this, mode, personUid, username, currentPassword, newPassword);
  };
  protoOf(PersonUsernameAndPasswordModel).toString = function () {
    return 'PersonUsernameAndPasswordModel(mode=' + this.gz0_1 + ', personUid=' + this.hz0_1.toString() + ', username=' + this.iz0_1 + ', currentPassword=' + this.jz0_1 + ', newPassword=' + this.kz0_1 + ')';
  };
  protoOf(PersonUsernameAndPasswordModel).hashCode = function () {
    var result = this.gz0_1;
    result = imul(result, 31) + this.hz0_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.iz0_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.jz0_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.kz0_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.gz0_1 === tmp0_other_with_cast.gz0_1))
      return false;
    if (!this.hz0_1.equals(tmp0_other_with_cast.hz0_1))
      return false;
    if (!(this.iz0_1 === tmp0_other_with_cast.iz0_1))
      return false;
    if (!(this.jz0_1 === tmp0_other_with_cast.jz0_1))
      return false;
    if (!(this.kz0_1 === tmp0_other_with_cast.kz0_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.rz3_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.az4(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.uz3_1;
    bulkAddFromUriUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_181() {
    this.bz4_1 = 'BulkAddPersonRunImport';
    this.cz4_1 = 'uri';
  }
  var Companion_instance_230;
  function Companion_getInstance_198() {
    return Companion_instance_230;
  }
  function sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0(function_0) {
    this.dz4_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0).ez4 = function (numImported, totalRecords) {
    return this.dz4_1(numImported, totalRecords);
  };
  function BulkAddPersonRunImportViewModel$slambda(this$0, resultContinuation) {
    this.nz4_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.nz4_1);
            var tmp_1 = Companion_getInstance_3().o2r(this.nz4_1.tz3_1);
            var tmp_2 = this.nz4_1.bqq();
            var tmp_3 = BulkAddPersonRunImportViewModel$slambda$lambda(this.nz4_1);
            suspendResult = tmp_0.upn(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.nz4_1.rz3_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.az4(false, VOID, result.xpn_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.nz4_1.rz3_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.opn_1;
                  var nextValue_0 = prevValue_0.az4(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.nz4_1, completion);
    i.oz4_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.rz3_1 = MutableStateFlow(new BulkAddPersonRunImportUiState());
    this.sz3_1 = asStateFlow(this.rz3_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.tz3_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.uz3_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.nqp_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, this.jqq().vol(strings_getInstance().ynp_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.aqq();
    launch(tmp_3, VOID, VOID, BulkAddPersonRunImportViewModel$slambda_0(this, null));
  }
  function Companion_182() {
    Companion_instance_231 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.pz4_1 = [null, null, null, new ArrayListSerializer($serializer_getInstance_55()), null];
  }
  var Companion_instance_231;
  function Companion_getInstance_199() {
    if (Companion_instance_231 == null)
      new Companion_182();
    return Companion_instance_231;
  }
  function $serializer_66() {
    $serializer_instance_66 = 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.qz4_1 = tmp0_serialDesc;
  }
  protoOf($serializer_66).q44 = function () {
    return this.qz4_1;
  };
  protoOf($serializer_66).k4g = function () {
    var tmp0_cached = Companion_getInstance_199().pz4_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_66).s44 = function (decoder) {
    var tmp0_desc = this.qz4_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_199().pz4_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_66).rz4 = function (encoder, value) {
    var tmp0_desc = this.qz4_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_199().pz4_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.vz3_1 === true)) {
      tmp1_output.o49(tmp0_desc, 0, value.vz3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.wz3_1 === 0)) {
      tmp1_output.r49(tmp0_desc, 1, value.wz3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.xz3_1 === 0)) {
      tmp1_output.r49(tmp0_desc, 2, value.xz3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !equals(value.yz3_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 3, tmp2_cached[3], value.yz3_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.zz3_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.zz3_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_66).r44 = function (encoder, value) {
    return this.rz4(encoder, value instanceof BulkAddPersonRunImportUiState ? value : THROW_CCE());
  };
  var $serializer_instance_66;
  function $serializer_getInstance_78() {
    if ($serializer_instance_66 == null)
      new $serializer_66();
    return $serializer_instance_66;
  }
  function BulkAddPersonRunImportUiState_init_$Init$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_78().qz4_1);
    }
    if (0 === (seen1 & 1))
      $this.vz3_1 = true;
    else
      $this.vz3_1 = inProgress;
    if (0 === (seen1 & 2))
      $this.wz3_1 = 0;
    else
      $this.wz3_1 = totalRecords;
    if (0 === (seen1 & 4))
      $this.xz3_1 = 0;
    else
      $this.xz3_1 = numImported;
    if (0 === (seen1 & 8))
      $this.yz3_1 = emptyList();
    else
      $this.yz3_1 = errors;
    if (0 === (seen1 & 16))
      $this.zz3_1 = null;
    else
      $this.zz3_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_199();
    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.vz3_1 = inProgress;
    this.wz3_1 = totalRecords;
    this.xz3_1 = numImported;
    this.yz3_1 = errors;
    this.zz3_1 = errorMessage;
  }
  protoOf(BulkAddPersonRunImportUiState).mu8 = function () {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.yz3_1.c1()) {
      tmp = true;
    } else {
      tmp = !(this.zz3_1 == null);
    }
    return tmp;
  };
  protoOf(BulkAddPersonRunImportUiState).vp5 = function () {
    var tmp;
    if (this.wz3_1 > 0) {
      tmp = this.xz3_1 / this.wz3_1;
    } else {
      tmp = 0.0;
    }
    return tmp;
  };
  protoOf(BulkAddPersonRunImportUiState).sz4 = function (inProgress, totalRecords, numImported, errors, errorMessage) {
    return new BulkAddPersonRunImportUiState(inProgress, totalRecords, numImported, errors, errorMessage);
  };
  protoOf(BulkAddPersonRunImportUiState).az4 = function (inProgress, totalRecords, numImported, errors, errorMessage, $super) {
    inProgress = inProgress === VOID ? this.vz3_1 : inProgress;
    totalRecords = totalRecords === VOID ? this.wz3_1 : totalRecords;
    numImported = numImported === VOID ? this.xz3_1 : numImported;
    errors = errors === VOID ? this.yz3_1 : errors;
    errorMessage = errorMessage === VOID ? this.zz3_1 : errorMessage;
    return $super === VOID ? this.sz4(inProgress, totalRecords, numImported, errors, errorMessage) : $super.sz4.call(this, inProgress, totalRecords, numImported, errors, errorMessage);
  };
  protoOf(BulkAddPersonRunImportUiState).toString = function () {
    return 'BulkAddPersonRunImportUiState(inProgress=' + this.vz3_1 + ', totalRecords=' + this.wz3_1 + ', numImported=' + this.xz3_1 + ', errors=' + this.yz3_1 + ', errorMessage=' + this.zz3_1 + ')';
  };
  protoOf(BulkAddPersonRunImportUiState).hashCode = function () {
    var result = getBooleanHashCode(this.vz3_1);
    result = imul(result, 31) + this.wz3_1 | 0;
    result = imul(result, 31) + this.xz3_1 | 0;
    result = imul(result, 31) + hashCode(this.yz3_1) | 0;
    result = imul(result, 31) + (this.zz3_1 == null ? 0 : getStringHashCode(this.zz3_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.vz3_1 === tmp0_other_with_cast.vz3_1))
      return false;
    if (!(this.wz3_1 === tmp0_other_with_cast.wz3_1))
      return false;
    if (!(this.xz3_1 === tmp0_other_with_cast.xz3_1))
      return false;
    if (!equals(this.yz3_1, tmp0_other_with_cast.yz3_1))
      return false;
    if (!(this.zz3_1 == tmp0_other_with_cast.zz3_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.qz5_1;
    openBlobUiUseCase$factory_4();
    return this_0.t2();
  }
  function Companion_183() {
    this.rz5_1 = 'BulkAddPersonSelectFile';
  }
  var Companion_instance_232;
  function Companion_getInstance_200() {
    return Companion_instance_232;
  }
  function BulkAddPersonSelectFileViewModel$slambda(this$0, resultContinuation) {
    this.az6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$slambda).hsg = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).he = function (p1, $completion) {
    return this.hsg(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.bz6_1.p7f();
            var tmp_1 = this.az6_1.bqq();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1024, 0);
            PermissionFlags_getInstance();
            suspendResult = tmp_0.bi2(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).jo1 = function (db, completion) {
    var i = new BulkAddPersonSelectFileViewModel$slambda(this.az6_1, completion);
    i.bz6_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.hsg(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.oz5_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.gz6(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.pz6_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.yz6_1 = this$0;
    this.zz6_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.yz6_1);
            var tmp_1 = new OpenBlobItem(this.zz6_1, 'text/csv', 'bulk-add-persons-template.csv', new Long(186, 0));
            suspendResult = tmp_0.xor(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.yz6_1, this.zz6_1, completion);
    i.az7_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.oz5_1 = MutableStateFlow(new BulkAddPersonSelectFileUiState());
    this.pz5_1 = asStateFlow(this.oz5_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.qz5_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.nqp_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, this.jqq().vol(strings_getInstance().ynp_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.uqq(tmp_1, true, tmp_2, BulkAddPersonSelectFileViewModel$slambda_2(null));
  }
  protoOf(BulkAddPersonSelectFileViewModel).bz7 = function (uri, name) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.oz5_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.onFileSelected.<anonymous>' call
        var nextValue = prevValue.gz6(uri, name);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(BulkAddPersonSelectFileViewModel).cz7 = function () {
    var tmp0_elvis_lhs = this.oz5_1.t2().cz6_1;
    this.lqp_1.wp8('BulkAddPersonRunImport', mapOf_0(to('uri', tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs)));
  };
  protoOf(BulkAddPersonSelectFileViewModel).dz7 = function () {
    var templatePath = this.zqp().voc().xnv_1 + 'staticfiles/bulkaddpersons/bulk-add-persons-template.csv';
    var tmp = this.aqq();
    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.cz6_1 = selectedFileUri;
    this.dz6_1 = selectedFileName;
    this.ez6_1 = fileSelectError;
    this.fz6_1 = fieldsEnabled;
  }
  protoOf(BulkAddPersonSelectFileUiState).ez7 = function () {
    return !(this.cz6_1 == null) ? this.fz6_1 : false;
  };
  protoOf(BulkAddPersonSelectFileUiState).fz7 = function (selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) {
    return new BulkAddPersonSelectFileUiState(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled);
  };
  protoOf(BulkAddPersonSelectFileUiState).gz6 = function (selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled, $super) {
    selectedFileUri = selectedFileUri === VOID ? this.cz6_1 : selectedFileUri;
    selectedFileName = selectedFileName === VOID ? this.dz6_1 : selectedFileName;
    fileSelectError = fileSelectError === VOID ? this.ez6_1 : fileSelectError;
    fieldsEnabled = fieldsEnabled === VOID ? this.fz6_1 : fieldsEnabled;
    return $super === VOID ? this.fz7(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) : $super.fz7.call(this, selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled);
  };
  protoOf(BulkAddPersonSelectFileUiState).toString = function () {
    return 'BulkAddPersonSelectFileUiState(selectedFileUri=' + this.cz6_1 + ', selectedFileName=' + this.dz6_1 + ', fileSelectError=' + this.ez6_1 + ', fieldsEnabled=' + this.fz6_1 + ')';
  };
  protoOf(BulkAddPersonSelectFileUiState).hashCode = function () {
    var result = this.cz6_1 == null ? 0 : getStringHashCode(this.cz6_1);
    result = imul(result, 31) + (this.dz6_1 == null ? 0 : getStringHashCode(this.dz6_1)) | 0;
    result = imul(result, 31) + (this.ez6_1 == null ? 0 : getStringHashCode(this.ez6_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fz6_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.cz6_1 == tmp0_other_with_cast.cz6_1))
      return false;
    if (!(this.dz6_1 == tmp0_other_with_cast.dz6_1))
      return false;
    if (!(this.ez6_1 == tmp0_other_with_cast.ez6_1))
      return false;
    if (!(this.fz6_1 === tmp0_other_with_cast.fz6_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 ChildProfileListViewModel$lambda$slambda$slambda$slambda$lambda($childProfileResult) {
    return function (it) {
      return it.f96_1.equals($childProfileResult.f96_1);
    };
  }
  function ChildProfileListViewModel$lambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.oz7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ChildProfileListViewModel$lambda$slambda$slambda$slambda).qz7 = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ChildProfileListViewModel$lambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qz7(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ChildProfileListViewModel$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;
          return this.oz7_1.uz8_1.t2().sz7_1;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ChildProfileListViewModel$lambda$slambda$slambda$slambda).jo1 = function (it, completion) {
    var i = new ChildProfileListViewModel$lambda$slambda$slambda$slambda(this.oz7_1, completion);
    i.pz7_1 = it;
    return i;
  };
  function ChildProfileListViewModel$lambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ChildProfileListViewModel$lambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.qz7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ChildProfileListViewModel$lambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.gz9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ChildProfileListViewModel$lambda$slambda$slambda$slambda_1).hz9 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ChildProfileListViewModel$lambda$slambda$slambda$slambda_1).m78 = function ($completion) {
    return this.hz9($completion);
  };
  protoOf(ChildProfileListViewModel$lambda$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 this.gz9_1.uz8_1.t2().sz7_1;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ChildProfileListViewModel$lambda$slambda$slambda$slambda_1).l78 = function (completion) {
    return new ChildProfileListViewModel$lambda$slambda$slambda$slambda_1(this.gz9_1, completion);
  };
  function ChildProfileListViewModel$lambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ChildProfileListViewModel$lambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.hz9($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ChildProfileListViewModel$lambda$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.uz8_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.ChildProfileListViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.iz9(VOID, it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ChildProfileListViewModel$lambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.rz9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ChildProfileListViewModel$lambda$slambda$slambda$slambda_3).zqc = function (result, $completion) {
    var tmp = this.aqd(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ChildProfileListViewModel$lambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.zqc(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ChildProfileListViewModel$lambda$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.sz9_1.gqc_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.tz9_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.rz9_1.uz8_1.t2().sz7_1;
            tmp_3.uz9_1 = replaceOrAppend(tmp_4, this.tz9_1, ChildProfileListViewModel$lambda$slambda$slambda$slambda$lambda(this.tz9_1));
            this.hd_1 = 1;
            suspendResult = updateChildProfileList(this.rz9_1, this.uz9_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(ChildProfileListViewModel$lambda$slambda$slambda$slambda_3).aqd = function (result, completion) {
    var i = new ChildProfileListViewModel$lambda$slambda$slambda$slambda_3(this.rz9_1, completion);
    i.sz9_1 = result;
    return i;
  };
  function ChildProfileListViewModel$lambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ChildProfileListViewModel$lambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.zqc(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ChildProfileListViewModel$lambda$slambda$slambda(this$0, resultContinuation) {
    this.dza_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ChildProfileListViewModel$lambda$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(ChildProfileListViewModel$lambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ChildProfileListViewModel$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 = 3;
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_instance_3.n4r());
            var tmp_1 = listOf_0('persons');
            var tmp_2 = ChildProfileListViewModel$lambda$slambda$slambda$slambda_0(this.dza_1, null);
            var tmp_3 = ChildProfileListViewModel$lambda$slambda$slambda$slambda_2(this.dza_1, null);
            suspendResult = this.dza_1.tqq(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ChildProfileListViewModel$lambda$slambda$slambda$lambda(this.dza_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_4 = this.dza_1.nqq(this.dza_1.gqq(), 'person');
            var tmp_5 = ChildProfileListViewModel$lambda$slambda$slambda$slambda_4(this.dza_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(ChildProfileListViewModel$lambda$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new ChildProfileListViewModel$lambda$slambda$slambda(this.dza_1, completion);
    i.eza_1 = $this$async;
    return i;
  };
  function ChildProfileListViewModel$lambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ChildProfileListViewModel$lambda$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$78($this, newChildProfileList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function addChildIntoUiState($this) {
    var childName = $this.jqp_1.ba('childName');
    var tmp0_safe_receiver = $this.jqp_1.ba('childGender');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    var childGender = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    var tmp2_safe_receiver = $this.jqp_1.ba('childDateOfBirth');
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
    var childDateOfBirth = tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
    var tmp = $this.aqq();
    launch(tmp, VOID, VOID, ChildProfileListViewModel$addChildIntoUiState$slambda_0(childName, $this, childGender, childDateOfBirth, null));
  }
  function updatePersonParentJoinWhenChildAddedViaLink($this) {
    var tmp = $this.aqq();
    launch(tmp, VOID, VOID, ChildProfileListViewModel$updatePersonParentJoinWhenChildAddedViaLink$slambda_0($this, null));
  }
  function Companion_184() {
    this.qza_1 = 'ChildProfileList';
    this.rza_1 = 'person';
    this.sza_1 = 'persons';
    this.tza_1 = 'childName';
    this.uza_1 = 'ppjUId';
    this.vza_1 = 'childDateOfBirth';
    this.wza_1 = 'childGender';
  }
  var Companion_instance_233;
  function Companion_getInstance_201() {
    return Companion_instance_233;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_33(function_0) {
    this.xza_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_33).t1d = function (value, $completion) {
    return this.xza_1(value, $completion);
  };
  function ChildProfileListViewModel$lambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ChildProfileListViewModel$lambda$slambda).hsg = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ChildProfileListViewModel$lambda$slambda).he = function (p1, $completion) {
    return this.hsg(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ChildProfileListViewModel$lambda$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(ChildProfileListViewModel$lambda$slambda).jo1 = function (it, completion) {
    var i = new ChildProfileListViewModel$lambda$slambda(completion);
    i.gzb_1 = it;
    return i;
  };
  function ChildProfileListViewModel$lambda$slambda_0(resultContinuation) {
    var i = new ChildProfileListViewModel$lambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.hsg(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ChildProfileListViewModel$lambda$slambda_1(this$0, resultContinuation) {
    this.pzb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ChildProfileListViewModel$lambda$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(ChildProfileListViewModel$lambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ChildProfileListViewModel$lambda$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.qzb_1, VOID, VOID, ChildProfileListViewModel$lambda$slambda$slambda_0(this.pzb_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ChildProfileListViewModel$lambda$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ChildProfileListViewModel$lambda$slambda_1(this.pzb_1, completion);
    i.qzb_1 = $this$launchIfHasPermission;
    return i;
  };
  function ChildProfileListViewModel$lambda$slambda_2(this$0, resultContinuation) {
    var i = new ChildProfileListViewModel$lambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ChildProfileListViewModel$lambda($savedStateHandle, this$0) {
    return function () {
      var tmp;
      if (!($savedStateHandle.ba('childName') == null)) {
        addChildIntoUiState(this$0);
        tmp = Unit_instance;
      }
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.uz8_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.ChildProfileListViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.iz9(VOID, VOID, VOID, VOID, VOID, this$0.zqp().eoc().znw_1);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this$0.nqp_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.ChildProfileListViewModel.<anonymous>.<anonymous>' call
          var tmp0_title = this$0.jqq().vol(strings_getInstance().hnr_1);
          var nextValue_0 = prevValue_0.vq8(VOID, VOID, tmp0_title, false, true, VOID, false);
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      var tmp_0 = ChildProfileListViewModel$lambda$slambda_0(null);
      this$0.vqq(tmp_0, VOID, VOID, ChildProfileListViewModel$lambda$slambda_2(this$0, null));
      return Unit_instance;
    };
  }
  function ChildProfileListViewModel$updateChildProfileList$slambda(this$0, $newChildProfileList, resultContinuation) {
    this.zzb_1 = this$0;
    this.azc_1 = $newChildProfileList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ChildProfileListViewModel$updateChildProfileList$slambda).wr2 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ChildProfileListViewModel$updateChildProfileList$slambda).he = function (p1, $completion) {
    return this.wr2((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ChildProfileListViewModel$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.zzb_1.m4r().r45(ListSerializer(Companion_instance_3.n4r()), this.azc_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ChildProfileListViewModel$updateChildProfileList$slambda).v1m = function ($this$withContext, completion) {
    var i = new ChildProfileListViewModel$updateChildProfileList$slambda(this.zzb_1, this.azc_1, completion);
    i.bzc_1 = $this$withContext;
    return i;
  };
  function ChildProfileListViewModel$updateChildProfileList$slambda_0(this$0, $newChildProfileList, resultContinuation) {
    var i = new ChildProfileListViewModel$updateChildProfileList$slambda(this$0, $newChildProfileList, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.wr2($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ChildProfileListViewModel$addChildIntoUiState$slambda($childName, this$0, $childGender, $childDateOfBirth, resultContinuation) {
    this.kzc_1 = $childName;
    this.lzc_1 = this$0;
    this.mzc_1 = $childGender;
    this.nzc_1 = $childDateOfBirth;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ChildProfileListViewModel$addChildIntoUiState$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(ChildProfileListViewModel$addChildIntoUiState$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ChildProfileListViewModel$addChildIntoUiState$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_safe_receiver = this.kzc_1;
            var tmp_1;
            if (tmp0_safe_receiver == null) {
              tmp_1 = null;
            } else {
              tmp_1 = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
            }

            tmp_0.pzc_1 = tmp_1;
            this.qzc_1 = toFirstAndLastNameExt(this.pzc_1);
            this.rzc_1 = this.qzc_1.y6();
            this.szc_1 = this.qzc_1.z6();
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.lzc_1.dqq());
            suspendResult = tmp_2.o62(9, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tzc_1 = suspendResult;
            this.uzc_1 = new Person(this.tzc_1, VOID, this.rzc_1, this.szc_1, VOID, VOID, this.mzc_1, VOID, true, this.nzc_1);
            l$ret$1: do {
              var this_0 = this.lzc_1.uz8_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.iz9(VOID, VOID, this.uzc_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            suspendResult = updateChildProfileList(this.lzc_1, listOf_0(this.uzc_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(ChildProfileListViewModel$addChildIntoUiState$slambda).v1m = function ($this$launch, completion) {
    var i = new ChildProfileListViewModel$addChildIntoUiState$slambda(this.kzc_1, this.lzc_1, this.mzc_1, this.nzc_1, completion);
    i.ozc_1 = $this$launch;
    return i;
  };
  function ChildProfileListViewModel$addChildIntoUiState$slambda_0($childName, this$0, $childGender, $childDateOfBirth, resultContinuation) {
    var i = new ChildProfileListViewModel$addChildIntoUiState$slambda($childName, this$0, $childGender, $childDateOfBirth, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ChildProfileListViewModel$onClickDeleteChildProfile$slambda(this$0, $person, resultContinuation) {
    this.dzd_1 = this$0;
    this.ezd_1 = $person;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ChildProfileListViewModel$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(ChildProfileListViewModel$onClickDeleteChildProfile$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ChildProfileListViewModel$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.dzd_1.uz8_1.t2().sz7_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.ezd_1.f96_1)) {
                destination.i1(element);
              }
            }

            suspendResult = updateChildProfileList(this.dzd_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(ChildProfileListViewModel$onClickDeleteChildProfile$slambda).v1m = function ($this$launch, completion) {
    var i = new ChildProfileListViewModel$onClickDeleteChildProfile$slambda(this.dzd_1, this.ezd_1, completion);
    i.fzd_1 = $this$launch;
    return i;
  };
  function ChildProfileListViewModel$onClickDeleteChildProfile$slambda_0(this$0, $person, resultContinuation) {
    var i = new ChildProfileListViewModel$onClickDeleteChildProfile$slambda(this$0, $person, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ChildProfileListViewModel$onProfileSelected$slambda(this$0, $profile, resultContinuation) {
    this.ozd_1 = this$0;
    this.pzd_1 = $profile;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ChildProfileListViewModel$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(ChildProfileListViewModel$onProfileSelected$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ChildProfileListViewModel$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.rzd_1 = new UstadGoOptions(VOID, VOID, true);
            if (!this.ozd_1.uz8_1.t2().sz7_1.c1()) {
              var tmp_0 = this;
              var tmp0_elvis_lhs = this.ozd_1.eqq();
              tmp_0.szd_1 = tmp0_elvis_lhs == null ? this.ozd_1.dqq() : tmp0_elvis_lhs;
              this.hd_1 = 1;
              suspendResult = this.szd_1.n7d().jg4(this.ozd_1.uz8_1.t2().sz7_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 tmp_2;
            if (!(this.ozd_1.uz8_1.t2().tz7_1 == null)) {
              var this_0 = this.ozd_1.uz8_1.t2().sz7_1;
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = this_0.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp_3 = element.f96_1;
                var tmp0_safe_receiver = this.ozd_1.uz8_1.t2().tz7_1;
                var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f96_1;
                if (!tmp_3.equals(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs)) {
                  destination.i1(element);
                }
              }
              tmp_2 = destination;
            } else {
              tmp_2 = this.ozd_1.uz8_1.t2().sz7_1;
            }

            tmp_1.tzd_1 = tmp_2;
            var tmp_4 = this;
            var this_1 = this.tzd_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_ppjMinorPersonUid = item.f96_1;
              var tmp1_ppjParentPersonUid = this.ozd_1.zqp().toc().cl0_1;
              var tmp3_ppjApprovalTiemstamp = systemTimeInMillis();
              destination_0.i1(new PersonParentJoin(VOID, VOID, VOID, VOID, VOID, tmp1_ppjParentPersonUid, tmp0_ppjMinorPersonUid, VOID, VOID, VOID, VOID, 1, tmp3_ppjApprovalTiemstamp));
            }

            tmp_4.uzd_1 = destination_0;
            if (!(this.ozd_1.uz8_1.t2().tz7_1 == null)) {
              updatePersonParentJoinWhenChildAddedViaLink(this.ozd_1);
            }

            var tmp_5 = this;
            tmp_5.vzd_1 = this.ozd_1.uz8_1.t2().sz7_1;
            this.wzd_1 = this.vzd_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.wzd_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.xzd_1 = this.wzd_1.e();
            var tmp_6 = this;
            tmp_6.yzd_1 = this.xzd_1;
            if (!this.yzd_1.equals(this.pzd_1)) {
              this.hd_1 = 3;
              suspendResult = this.ozd_1.zqp().ho5(this.yzd_1, this.ozd_1.zqp().voc().xnv_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.szd_1.x7e().tgs(this.uzd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.hd_1 = 7;
            continue $sm;
          case 7:
            if (!this.pzd_1.equals(this.ozd_1.zqp().eoc().znw_1)) {
              this.hd_1 = 8;
              suspendResult = this.ozd_1.zqp().ho5(this.pzd_1, this.ozd_1.zqp().voc().xnv_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.ozd_1.zqp().znz(sessionWithPersonAndLearningSpace);
            this.hd_1 = 9;
            continue $sm;
          case 9:
            Companion_getInstance_170();
            this.ozd_1.vqw(this.ozd_1.lqp_1, appendSelectedAccount('ContentEntryListHome', this.pzd_1.f96_1, new LearningSpace(this.ozd_1.zqp().voc().xnv_1)), this.rzd_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(ChildProfileListViewModel$onProfileSelected$slambda).v1m = function ($this$launch, completion) {
    var i = new ChildProfileListViewModel$onProfileSelected$slambda(this.ozd_1, this.pzd_1, completion);
    i.qzd_1 = $this$launch;
    return i;
  };
  function ChildProfileListViewModel$onProfileSelected$slambda_0(this$0, $profile, resultContinuation) {
    var i = new ChildProfileListViewModel$onProfileSelected$slambda(this$0, $profile, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ChildProfileListViewModel$updatePersonParentJoinWhenChildAddedViaLink$slambda(this$0, resultContinuation) {
    this.hze_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ChildProfileListViewModel$updatePersonParentJoinWhenChildAddedViaLink$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(ChildProfileListViewModel$updatePersonParentJoinWhenChildAddedViaLink$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ChildProfileListViewModel$updatePersonParentJoinWhenChildAddedViaLink$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 tmp9_elvis_lhs = this.hze_1.eqq();
            var tmp_0 = (tmp9_elvis_lhs == null ? this.hze_1.dqq() : tmp9_elvis_lhs).x7e();
            var tmp0_safe_receiver = this.hze_1.jqp_1.ba('ppjUId');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp4_ppjUid = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var tmp2_safe_receiver = this.hze_1.uz8_1.t2().tz7_1;
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.f96_1;
            var tmp5_ppjMinorPersonUid = tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
            var tmp6_ppjParentPersonUid = this.hze_1.zqp().toc().cl0_1;
            var tmp8_ppjApprovalTiemstamp = systemTimeInMillis();
            suspendResult = tmp_0.ugs(new PersonParentJoin(tmp4_ppjUid, VOID, VOID, VOID, VOID, tmp6_ppjParentPersonUid, tmp5_ppjMinorPersonUid, VOID, VOID, VOID, VOID, 1, tmp8_ppjApprovalTiemstamp), 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(ChildProfileListViewModel$updatePersonParentJoinWhenChildAddedViaLink$slambda).v1m = function ($this$launch, completion) {
    var i = new ChildProfileListViewModel$updatePersonParentJoinWhenChildAddedViaLink$slambda(this.hze_1, completion);
    i.ize_1 = $this$launch;
    return i;
  };
  function ChildProfileListViewModel$updatePersonParentJoinWhenChildAddedViaLink$slambda_0(this$0, resultContinuation) {
    var i = new ChildProfileListViewModel$updatePersonParentJoinWhenChildAddedViaLink$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $updateChildProfileListCOROUTINE$78(_this__u8e3s4, newChildProfileList, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.nza_1 = _this__u8e3s4;
    this.oza_1 = newChildProfileList;
  }
  protoOf($updateChildProfileListCOROUTINE$78).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.nza_1.uz8_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.iz9(VOID, this.oza_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.pza_1 = this.nza_1.jqp_1;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, ChildProfileListViewModel$updateChildProfileList$slambda_0(this.nza_1, this.oza_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.pza_1.mql('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 ChildProfileListViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'ChildProfileList');
    this.uz8_1 = MutableStateFlow(new ChildProfileListUiState());
    var tmp = this;
    Companion_getInstance_117();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_141();
      tmp_0 = 'CourseListHome';
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.vz8_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.wz8_1 = Instance(this_0, tmp$ret$0, null).a5d(this, repo$factory());
    this.xz8_1 = asStateFlow(this.uz8_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.uz8_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.ChildProfileListViewModel.<anonymous>' call
        var nextValue = prevValue.iz9(VOID, VOID, VOID, VOID, VOID, this.zqp().eoc().znw_1);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('childName');
    var childName = tmp0_elvis_lhs_0 == null ? '' : tmp0_elvis_lhs_0;
    var tmp1_elvis_lhs = savedStateHandle.ba('childGender');
    var childGender = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
    var tmp2_elvis_lhs = savedStateHandle.ba('childDateOfBirth');
    var childDateOfBirth = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
    var tmp3_elvis_lhs = savedStateHandle.ba('ppjUId');
    var ppjUids = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
    var tmp_3 = mapOf([to('childName', childName), to('childGender', childGender), to('childDateOfBirth', childDateOfBirth), to('ppjUId', ppjUids)]);
    this.yqq(false, tmp_3, ChildProfileListViewModel$lambda(savedStateHandle, this));
  }
  protoOf(ChildProfileListViewModel).jze = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.wz8_1;
    repo$factory_0();
    return this_0.t2();
  };
  protoOf(ChildProfileListViewModel).iwz = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.uz8_1.t2().sz7_1.c1()) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.uz8_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.ChildProfileListViewModel.onClickDone.<anonymous>' call
          var nextValue = prevValue.iz9(VOID, VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    } else {
      this.kze(this.zqp().toc().kl0());
    }
  };
  protoOf(ChildProfileListViewModel).lze = 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.ChildProfileListViewModel.onClickAddChileProfile.<anonymous>' call
    Companion_getInstance_116();
    this.jqp_1.ba('entity');
    var tmp2_args = this_0.f3();
    var tmp3_serializer = Companion_instance_3.n4r();
    this.rqq(tmp0_nextViewName, 'person', null, tmp3_serializer, tmp2_args);
  };
  protoOf(ChildProfileListViewModel).mze = 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.ChildProfileListViewModel.onClickEditChileProfile.<anonymous>' call
    Companion_getInstance_116();
    this.jqp_1.ba('entity');
    var tmp3_args = this_0.f3();
    this.rqq(tmp0_nextViewName, 'person', person, tmp2_serializer, tmp3_args);
  };
  protoOf(ChildProfileListViewModel).nze = function (person) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ChildProfileListViewModel$onClickDeleteChildProfile$slambda_0(this, person, null));
  };
  protoOf(ChildProfileListViewModel).oze = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.uz8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.ChildProfileListViewModel.onDismissLangDialog.<anonymous>' call
        var nextValue = prevValue.iz9(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ChildProfileListViewModel).kze = function (profile) {
    var tmp = this.aqq();
    launch(tmp, VOID, VOID, ChildProfileListViewModel$onProfileSelected$slambda_0(this, profile, null));
  };
  function ChildProfileListUiState(onAddChildProfile, childProfiles, childAddedViaLink, personParenJoinList, showProfileSelectionDialog, parent) {
    onAddChildProfile = onAddChildProfile === VOID ? null : onAddChildProfile;
    childProfiles = childProfiles === VOID ? emptyList() : childProfiles;
    childAddedViaLink = childAddedViaLink === VOID ? null : childAddedViaLink;
    personParenJoinList = personParenJoinList === VOID ? emptyList() : personParenJoinList;
    showProfileSelectionDialog = showProfileSelectionDialog === VOID ? false : showProfileSelectionDialog;
    parent = parent === VOID ? null : parent;
    this.rz7_1 = onAddChildProfile;
    this.sz7_1 = childProfiles;
    this.tz7_1 = childAddedViaLink;
    this.uz7_1 = personParenJoinList;
    this.vz7_1 = showProfileSelectionDialog;
    this.wz7_1 = parent;
  }
  protoOf(ChildProfileListUiState).pze = function () {
    var tmp0_safe_receiver = this.wz7_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.ChildProfileListUiState.<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.sz7_1);
  };
  protoOf(ChildProfileListUiState).qze = function (onAddChildProfile, childProfiles, childAddedViaLink, personParenJoinList, showProfileSelectionDialog, parent) {
    return new ChildProfileListUiState(onAddChildProfile, childProfiles, childAddedViaLink, personParenJoinList, showProfileSelectionDialog, parent);
  };
  protoOf(ChildProfileListUiState).iz9 = function (onAddChildProfile, childProfiles, childAddedViaLink, personParenJoinList, showProfileSelectionDialog, parent, $super) {
    onAddChildProfile = onAddChildProfile === VOID ? this.rz7_1 : onAddChildProfile;
    childProfiles = childProfiles === VOID ? this.sz7_1 : childProfiles;
    childAddedViaLink = childAddedViaLink === VOID ? this.tz7_1 : childAddedViaLink;
    personParenJoinList = personParenJoinList === VOID ? this.uz7_1 : personParenJoinList;
    showProfileSelectionDialog = showProfileSelectionDialog === VOID ? this.vz7_1 : showProfileSelectionDialog;
    parent = parent === VOID ? this.wz7_1 : parent;
    return $super === VOID ? this.qze(onAddChildProfile, childProfiles, childAddedViaLink, personParenJoinList, showProfileSelectionDialog, parent) : $super.qze.call(this, onAddChildProfile, childProfiles, childAddedViaLink, personParenJoinList, showProfileSelectionDialog, parent);
  };
  protoOf(ChildProfileListUiState).toString = function () {
    return 'ChildProfileListUiState(onAddChildProfile=' + this.rz7_1 + ', childProfiles=' + this.sz7_1 + ', childAddedViaLink=' + this.tz7_1 + ', personParenJoinList=' + this.uz7_1 + ', showProfileSelectionDialog=' + this.vz7_1 + ', parent=' + this.wz7_1 + ')';
  };
  protoOf(ChildProfileListUiState).hashCode = function () {
    var result = this.rz7_1 == null ? 0 : getStringHashCode(this.rz7_1);
    result = imul(result, 31) + hashCode(this.sz7_1) | 0;
    result = imul(result, 31) + (this.tz7_1 == null ? 0 : this.tz7_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.uz7_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vz7_1) | 0;
    result = imul(result, 31) + (this.wz7_1 == null ? 0 : this.wz7_1.hashCode()) | 0;
    return result;
  };
  protoOf(ChildProfileListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ChildProfileListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ChildProfileListUiState ? other : THROW_CCE();
    if (!(this.rz7_1 == tmp0_other_with_cast.rz7_1))
      return false;
    if (!equals(this.sz7_1, tmp0_other_with_cast.sz7_1))
      return false;
    if (!equals(this.tz7_1, tmp0_other_with_cast.tz7_1))
      return false;
    if (!equals(this.uz7_1, tmp0_other_with_cast.uz7_1))
      return false;
    if (!(this.vz7_1 === tmp0_other_with_cast.vz7_1))
      return false;
    if (!equals(this.wz7_1, tmp0_other_with_cast.wz7_1))
      return false;
    return true;
  };
  function repo$factory() {
    return getPropertyCallableRef('repo', 1, KProperty1, function (receiver) {
      return receiver.jze();
    }, null);
  }
  function repo$factory_0() {
    return getPropertyCallableRef('repo', 1, KProperty1, function (receiver) {
      return receiver.jze();
    }, null);
  }
  function EditChildProfileViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$slambda$slambda).azf = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EditChildProfileViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.azf(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).jo1 = function (it, completion) {
    var i = new EditChildProfileViewModel$slambda$slambda(completion);
    i.zze_1 = it;
    return i;
  };
  function EditChildProfileViewModel$slambda$slambda_0(resultContinuation) {
    var i = new EditChildProfileViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.azf(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EditChildProfileViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.jzf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$slambda$slambda_1).kzf = 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.kzf($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.jzf_1.dqq());
            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.jzf_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.kzf($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.izg_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp;
          if ((it == null ? null : it.h96_1) === '') {
            tmp = null;
          } else {
            tmp = it == null ? null : it.hks();
          }
          var nextValue = prevValue.tzg(it, VOID, VOID, VOID, VOID, VOID, VOID, tmp);
          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.kzg_1;
    genderConfig$factory_0();
    return this_0.t2();
  }
  function hasErrors_3(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.mzg_1 == null) ? true : !(_this__u8e3s4.rzg_1 == null)) ? true : !(_this__u8e3s4.ozg_1 == null);
  }
  function Companion_185() {
    this.uzg_1 = 'EditChildProfile';
  }
  var Companion_instance_234;
  function Companion_getInstance_202() {
    return Companion_instance_234;
  }
  function EditChildProfileViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function EditChildProfileViewModel$slambda(this$0, resultContinuation) {
    this.dzh_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.fzh_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.dzh_1, null);
            suspendResult = this.dzh_1.tqq(this.fzh_1, VOID, VOID, tmp_0, tmp_1, EditChildProfileViewModel$slambda$lambda(this.dzh_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.dzh_1, completion);
    i.ezh_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.ozh_1 = $commitDelay;
    this.pzh_1 = $entity;
    this.qzh_1 = $this;
    this.rzh_1 = $key;
    this.szh_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.ozh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.pzh_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.qzh_1.pqq(this.qzh_1.jqp_1, this.rzh_1, this.szh_1, this.pzh_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.ozh_1, this.pzh_1, this.qzh_1, this.rzh_1, this.szh_1, completion);
    i.tzh_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$onClickSave$lambda($firstName, $lastName) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.h96_1 = $firstName;
      $this$shallowCopy.i96_1 = $lastName;
      return Unit_instance;
    };
  }
  function EditChildProfileViewModel$onClickSave$slambda(this$0, $savePerson, $ppjUid, resultContinuation) {
    this.czi_1 = this$0;
    this.dzi_1 = $savePerson;
    this.ezi_1 = $ppjUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$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(EditChildProfileViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EditChildProfileViewModel$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;
            var tmp0_elvis_lhs = this.czi_1.eqq();
            tmp_0.gzi_1 = tmp0_elvis_lhs == null ? this.czi_1.dqq() : tmp0_elvis_lhs;
            this.hd_1 = 1;
            suspendResult = this.gzi_1.n7d().insertAsync(this.dzi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var tmp1_ppjMinorPersonUid = this.dzi_1.f96_1;
            var tmp2_ppjParentPersonUid = this.czi_1.zqp().toc().cl0_1;
            var tmp4_ppjApprovalTiemstamp = systemTimeInMillis();
            tmp_1.hzi_1 = new PersonParentJoin(this.ezi_1, VOID, VOID, VOID, VOID, tmp2_ppjParentPersonUid, tmp1_ppjMinorPersonUid, VOID, VOID, VOID, VOID, 1, tmp4_ppjApprovalTiemstamp);
            this.hd_1 = 2;
            suspendResult = this.czi_1.zqp().ho5(this.dzi_1, this.czi_1.zqp().voc().xnv_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            suspendResult = this.gzi_1.x7e().ugs(this.hzi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            Companion_getInstance_170();
            this.czi_1.vqw(this.czi_1.lqp_1, appendSelectedAccount('ContentEntryListHome', this.czi_1.zqp().toc().cl0_1, new LearningSpace(this.czi_1.zqp().voc().xnv_1)), new UstadGoOptions(VOID, VOID, true));
            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$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new EditChildProfileViewModel$onClickSave$slambda(this.czi_1, this.dzi_1, this.ezi_1, completion);
    i.fzi_1 = $this$launch;
    return i;
  };
  function EditChildProfileViewModel$onClickSave$slambda_0(this$0, $savePerson, $ppjUid, resultContinuation) {
    var i = new EditChildProfileViewModel$onClickSave$slambda(this$0, $savePerson, $ppjUid, 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.izg_1 = MutableStateFlow(new EditChildProfileUiState());
    this.jzg_1 = asStateFlow(this.izg_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.kzg_1 = Instance(this, tmp$ret$0, null).a5d(this, genderConfig$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.izg_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>' call
        var nextValue = prevValue.tzg(VOID, VOID, _get_genderConfig__kyr0zc(this).uq9_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nqp_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>' call
        var tmp0_title = this.jqq().vol(strings_getInstance().gnr_1);
        var nextValue_0 = prevValue_0.vq8(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.nqp_1;
      while (true) {
        var prevValue_1 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>' call
        var tmp_1 = this.jqq().vol(strings_getInstance().on4_1);
        var nextValue_1 = prevValue_1.vq8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_1, VOID, EditChildProfileViewModel$onClickSave$ref(this)));
        if (this_2.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    var tmp_2 = this.aqq();
    launch(tmp_2, VOID, VOID, EditChildProfileViewModel$slambda_0(this, null));
  }
  protoOf(EditChildProfileViewModel).izi = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.izg_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.lzg_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l96_1;
        var tmp_0 = this.uqw(tmp, entity == null ? null : entity.l96_1, prevValue.ozg_1);
        var tmp2_safe_receiver = prevValue.lzg_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.h96_1;
        var nextValue = prevValue.tzg(entity, VOID, VOID, tmp_0, VOID, VOID, this.uqw(tmp_1, entity == null ? null : entity.h96_1, prevValue.rzg_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_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.aqq();
    tmp_2.qqv_1 = launch(tmp_3, VOID, VOID, EditChildProfileViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(EditChildProfileViewModel).vsd = function () {
    this.lqq(Companion_getInstance_98().cq9_1);
    var tmp0_elvis_lhs = this.izg_1.t2().lzg_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var savePerson = tmp;
    var requiredFieldMessage = this.jqq().vol(strings_getInstance().cmp_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.izg_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.onClickSave.<anonymous>' call
        var tmp_0;
        if (savePerson.o96_1.equals(new Long(0, 0))) {
          tmp_0 = requiredFieldMessage;
        } else {
          tmp_0 = null;
        }
        var tmp_1 = tmp_0;
        var tmp_2;
        var tmp_3 = savePerson.l96_1;
        if (tmp_3 === 0) {
          tmp_2 = requiredFieldMessage;
        } else {
          tmp_2 = null;
        }
        var tmp_4 = tmp_2;
        var tmp_5;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = this.izg_1.t2().szg_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_5 = requiredFieldMessage;
        } else {
          tmp_5 = null;
        }
        var nextValue = prevValue.tzg(VOID, tmp_1, VOID, tmp_4, VOID, VOID, tmp_5);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_3(this.izg_1.t2(), this)) {
      this.lqq(Companion_getInstance_98().dq9_1);
      return Unit_instance;
    }
    var tmp1_safe_receiver = this.izg_1.t2().szg_1;
    var tmp_6;
    if (tmp1_safe_receiver == null) {
      tmp_6 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_6 = toString(trim(isCharSequence(tmp1_safe_receiver) ? tmp1_safe_receiver : THROW_CCE()));
    }
    var fullName = tmp_6;
    var tmp2_container = toFirstAndLastNameExt(fullName);
    var firstName = tmp2_container.y6();
    var lastName = tmp2_container.z6();
    var tmp3_safe_receiver = this.izg_1.t2().lzg_1;
    var tmp_7;
    if (tmp3_safe_receiver == null) {
      tmp_7 = null;
    } else {
      tmp_7 = shallowCopy(tmp3_safe_receiver, EditChildProfileViewModel$onClickSave$lambda(firstName, lastName));
    }
    this.izi(tmp_7);
    var tmp4_safe_receiver = this.jqp_1.ba('ppjUId');
    var ppjUid = tmp4_safe_receiver == null ? null : toLong_0(tmp4_safe_receiver);
    if (!(ppjUid == null)) {
      var tmp_8 = this.aqq();
      launch(tmp_8, VOID, VOID, EditChildProfileViewModel$onClickSave$slambda_0(this, savePerson, ppjUid, null));
      return Unit_instance;
    }
    this.uqv(this.izg_1.t2().lzg_1);
  };
  function EditChildProfileUiState(person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError, fullNameError, fullName) {
    person = person === VOID ? null : person;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance_0().wq9_1 : genderOptions;
    genderError = genderError === VOID ? null : genderError;
    firstNameError = firstNameError === VOID ? null : firstNameError;
    lastNameError = lastNameError === VOID ? null : lastNameError;
    fullNameError = fullNameError === VOID ? null : fullNameError;
    fullName = fullName === VOID ? null : fullName;
    this.lzg_1 = person;
    this.mzg_1 = dateOfBirthError;
    this.nzg_1 = genderOptions;
    this.ozg_1 = genderError;
    this.pzg_1 = firstNameError;
    this.qzg_1 = lastNameError;
    this.rzg_1 = fullNameError;
    this.szg_1 = fullName;
  }
  protoOf(EditChildProfileUiState).jzi = function (person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError, fullNameError, fullName) {
    return new EditChildProfileUiState(person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError, fullNameError, fullName);
  };
  protoOf(EditChildProfileUiState).tzg = function (person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError, fullNameError, fullName, $super) {
    person = person === VOID ? this.lzg_1 : person;
    dateOfBirthError = dateOfBirthError === VOID ? this.mzg_1 : dateOfBirthError;
    genderOptions = genderOptions === VOID ? this.nzg_1 : genderOptions;
    genderError = genderError === VOID ? this.ozg_1 : genderError;
    firstNameError = firstNameError === VOID ? this.pzg_1 : firstNameError;
    lastNameError = lastNameError === VOID ? this.qzg_1 : lastNameError;
    fullNameError = fullNameError === VOID ? this.rzg_1 : fullNameError;
    fullName = fullName === VOID ? this.szg_1 : fullName;
    return $super === VOID ? this.jzi(person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError, fullNameError, fullName) : $super.jzi.call(this, person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError, fullNameError, fullName);
  };
  protoOf(EditChildProfileUiState).toString = function () {
    return 'EditChildProfileUiState(person=' + this.lzg_1 + ', dateOfBirthError=' + this.mzg_1 + ', genderOptions=' + this.nzg_1 + ', genderError=' + this.ozg_1 + ', firstNameError=' + this.pzg_1 + ', lastNameError=' + this.qzg_1 + ', fullNameError=' + this.rzg_1 + ', fullName=' + this.szg_1 + ')';
  };
  protoOf(EditChildProfileUiState).hashCode = function () {
    var result = this.lzg_1 == null ? 0 : this.lzg_1.hashCode();
    result = imul(result, 31) + (this.mzg_1 == null ? 0 : getStringHashCode(this.mzg_1)) | 0;
    result = imul(result, 31) + hashCode(this.nzg_1) | 0;
    result = imul(result, 31) + (this.ozg_1 == null ? 0 : getStringHashCode(this.ozg_1)) | 0;
    result = imul(result, 31) + (this.pzg_1 == null ? 0 : getStringHashCode(this.pzg_1)) | 0;
    result = imul(result, 31) + (this.qzg_1 == null ? 0 : getStringHashCode(this.qzg_1)) | 0;
    result = imul(result, 31) + (this.rzg_1 == null ? 0 : getStringHashCode(this.rzg_1)) | 0;
    result = imul(result, 31) + (this.szg_1 == null ? 0 : getStringHashCode(this.szg_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.lzg_1, tmp0_other_with_cast.lzg_1))
      return false;
    if (!(this.mzg_1 == tmp0_other_with_cast.mzg_1))
      return false;
    if (!equals(this.nzg_1, tmp0_other_with_cast.nzg_1))
      return false;
    if (!(this.ozg_1 == tmp0_other_with_cast.ozg_1))
      return false;
    if (!(this.pzg_1 == tmp0_other_with_cast.pzg_1))
      return false;
    if (!(this.qzg_1 == tmp0_other_with_cast.qzg_1))
      return false;
    if (!(this.rzg_1 == tmp0_other_with_cast.rzg_1))
      return false;
    if (!(this.szg_1 == tmp0_other_with_cast.szg_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).uzi = function (entity, permissions, $completion) {
    var tmp = this.vzi(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.uzi(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.szi_1;
          var tmp_0;
          if (this.tzi_1.gi4_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).vzi = function (entity, permissions, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.szi_1 = entity;
    i.tzi_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.uzi(entity, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.ezj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).gzj = function (person, $completion) {
    var tmp = this.hzj(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.gzj((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.ezj_1.ezk_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.fzj_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.ezj_1);
                tmp_0 = tmp0_safe_receiver_0 == null ? null : formatInternationalOrNull(tmp0_safe_receiver_0, tmp2_safe_receiver);
              }
              var nextValue = prevValue.szk(this.fzj_1, tmp_0);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.ezj_1.nqp_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_1 = this.fzj_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.fzj_1 == null)) {
                tmp_1 = Companion_getInstance_98().dq9_1;
              } else {
                tmp_1 = Companion_getInstance_98().cq9_1;
              }
              var tmp4_loadingState = tmp_1;
              var nextValue_0 = prevValue_0.vq8(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).hzj = function (person, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this.ezj_1, completion);
    i.fzj_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.gzj(person, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.bzl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).uqh = function (it, $completion) {
    var tmp = this.vqh(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.uqh((!(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.bzl_1.ezk_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.szk(VOID, VOID, VOID, VOID, VOID, this.czl_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).vqh = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this.bzl_1, completion);
    i.czl_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.uqh(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.vx9();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.lzl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).nzl = function (it, $completion) {
    var tmp = this.ozl(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.nzl(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.lzl_1.ezk_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.szk(VOID, VOID, VOID, VOID, this.mzl_1.hi4_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.lzl_1.nqp_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp_0;
              if (this.mzl_1.hi4_1) {
                var tmp_1 = this.lzl_1.jqq().vol(strings_getInstance().amx_1);
                var tmp_2 = FabIcon_EDIT_getInstance();
                tmp_0 = new FabUiState(true, tmp_1, tmp_2, PersonDetailViewModel$onClickEdit$ref(this.lzl_1));
              } else {
                tmp_0 = new FabUiState();
              }
              var nextValue_0 = prevValue_0.vq8(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).ozl = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this.lzl_1, completion);
    i.mzl_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.nzl(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.xzl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).zzl = function (it, $completion) {
    var tmp = this.azm(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.zzl((!(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.xzl_1.ezk_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.szk(VOID, VOID, VOID, this.yzl_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).azm = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this.xzl_1, completion);
    i.yzl_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.zzl(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation) {
    this.jzm_1 = $entityFlow;
    this.kzm_1 = $viewAndEditPermissionFlow;
    this.lzm_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.jzm_1, this.kzm_1, PersonDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_2(this.lzm_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.jzm_1, this.kzm_1, this.lzm_1, completion);
    i.mzm_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.vzm_1 = $hasManagePermissionsPermissionFlow;
    this.wzm_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.vzm_1);
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_4(this.wzm_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.vzm_1, this.wzm_1, completion);
    i.xzm_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.gzn_1 = $viewAndEditPermissionFlow;
    this.hzn_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.hzn_1, null);
            suspendResult = this.gzn_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.gzn_1, this.hzn_1, completion);
    i.izn_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.rzn_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.rzn_1.dqq().t7d().h93(this.rzn_1.bqq(), this.rzn_1.dqp_1);
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_8(this.rzn_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.rzn_1, completion);
    i.szn_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.bzo_1 = $this_launch;
    this.czo_1 = $entityFlow;
    this.dzo_1 = $viewAndEditPermissionFlow;
    this.ezo_1 = this$0;
    this.fzo_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.bzo_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_0(this.czo_1, this.dzo_1, this.ezo_1, null));
          launch(this.bzo_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_2(this.fzo_1, this.ezo_1, null));
          launch(this.bzo_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_4(this.dzo_1, this.ezo_1, null));
          launch(this.bzo_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_6(this.ezo_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.bzo_1, this.czo_1, this.dzo_1, this.ezo_1, this.fzo_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.hzk_1;
    phoneNumberUtil$factory_0();
    return this_0.t2();
  }
  function _get_onClickPhoneNumUseCase__2tcaut($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.izk_1;
    onClickPhoneNumUseCase$factory_0();
    return this_0.t2();
  }
  function _get_onClickSendSmsUseCase__plj4zm($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jzk_1;
    onClickSendSmsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_onClickEmailUseCase__v8uzjh($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kzk_1;
    onClickEmailUseCase$factory_0();
    return this_0.t2();
  }
  function navigateToEditAccount($this) {
    Companion_getInstance_126();
    $this.lqp_1.wp8('AccountEdit', mapOf_0(to('entityUid', $this.gzk_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_126();
    this_0.s('entityUid', $this.gzk_1.toString());
    var tmp0_safe_receiver = $this.ezk_1.t2().lzk_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.ezk_1.t2().lzk_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.hks()));
    var tmp$ret$2 = this_0.f3();
    $this.lqp_1.wp8('ManageAccount', tmp$ret$2);
  }
  function Companion_186() {
    this.gzo_1 = 'PersonDetailView';
  }
  var Companion_instance_235;
  function Companion_getInstance_203() {
    return Companion_instance_235;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_34(function_0) {
    this.hzo_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_34).t1d = function (value, $completion) {
    return this.hzo_1(value, $completion);
  };
  function PersonDetailViewModel$onClickEdit$ref_0($boundThis) {
    var l = function () {
      $boundThis.vx9();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function PersonDetailViewModel$slambda(this$0, resultContinuation) {
    this.qzo_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.szo_1 = this.qzo_1.fqq().n7d().pg4(this.qzo_1.dqp_1, this.qzo_1.bqq());
            this.tzo_1 = shareIn(this.qzo_1.fqq().p7f().ci2(this.qzo_1.bqq(), this.qzo_1.dqp_1), this.qzo_1.aqq(), Companion_getInstance_12().v1h());
            var tmp_0 = this;
            var tmp_1 = this.qzo_1.dqq().p7f();
            var tmp_2 = this.qzo_1.bqq();
            PermissionFlags_getInstance();
            tmp_0.uzo_1 = tmp_1.zi1(tmp_2, new Long(4096, 0));
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.qzo_1.ezk_1, PersonDetailViewModel$slambda$slambda_0(this.rzo_1, this.szo_1, this.tzo_1, this.qzo_1, this.uzo_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.qzo_1, completion);
    i.rzo_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.ezk_1 = MutableStateFlow(new PersonDetailUiState());
    this.fzk_1 = asStateFlow(this.ezk_1);
    var tmp = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.gzk_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.hzk_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.izk_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.jzk_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.kzk_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.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_98().cq9_1;
        var tmp_9 = this.jqq().vol(strings_getInstance().amx_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.vq8(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.ezk_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.<anonymous>' call
        var tmp0_isActiveUser = this.dqp_1.equals(this.bqq());
        var tmp1_canSendSms = !(_get_onClickSendSmsUseCase__plj4zm(this) == null);
        var nextValue_0 = prevValue_0.szk(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.aqq();
    launch(tmp_11, VOID, VOID, PersonDetailViewModel$slambda_0(this, null));
  }
  protoOf(PersonDetailViewModel).vx9 = function () {
    Companion_getInstance_204();
    Companion_getInstance_126();
    this.lqp_1.wp8('PersonEditView', mapOf_0(to('entityUid', this.gzk_1.toString())));
  };
  protoOf(PersonDetailViewModel).vzo = function () {
    return navigateToEditAccount(this);
  };
  protoOf(PersonDetailViewModel).wzo = function () {
    return navigateToManageAccount(this);
  };
  protoOf(PersonDetailViewModel).xzo = function () {
    Companion_getInstance_117();
    this.lqp_1.wp8('MessageList', mapOf_0(to('personUid', this.gzk_1.toString())));
  };
  protoOf(PersonDetailViewModel).yzo = function () {
    var tmp0_safe_receiver = this.ezk_1.t2().lzk_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).bp4(tmp2_safe_receiver);
    }
  };
  protoOf(PersonDetailViewModel).zzo = function () {
    var tmp0_safe_receiver = this.ezk_1.t2().lzk_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).bp4(tmp2_safe_receiver);
    }
  };
  protoOf(PersonDetailViewModel).ls1 = function () {
    Companion_getInstance_126();
    this.lqp_1.wp8('SystemPermission', mapOf_0(to('personUid', this.dqp_1.toString())));
  };
  protoOf(PersonDetailViewModel).azp = function () {
    var tmp0_safe_receiver = this.ezk_1.t2().lzk_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_126();
      var tmp = to('entityUid', ppjUid.toString());
      Companion_getInstance_126();
      Companion_getInstance_117();
      this.lqp_1.wp8('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.lzk_1 = person;
    this.mzk_1 = displayPhoneNum;
    this.nzk_1 = canSendSms;
    this.ozk_1 = clazzes;
    this.pzk_1 = hasChangePasswordPermission;
    this.qzk_1 = showPermissionButton;
    this.rzk_1 = isActiveUser;
  }
  protoOf(PersonDetailUiState).bzp = function () {
    var tmp0_safe_receiver = this.lzk_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).czp = function () {
    var tmp;
    var tmp0_safe_receiver = this.lzk_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.lzk_1.vg7_1;
      tmp = !((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.l96_1) === 0);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).dzp = function () {
    var tmp;
    var tmp0_safe_receiver = this.lzk_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.pzk_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).ezp = function () {
    var tmp;
    var tmp_0;
    if (!(this.lzk_1 == null)) {
      var tmp0_safe_receiver = this.lzk_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.pzk_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).fzp = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.lzk_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).gzp = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.lzk_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).hzp = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.lzk_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).izp = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.lzk_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).jzp = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.lzk_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).kzp = function () {
    var tmp0_safe_receiver = this.lzk_1;
    return !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wg7_1) == null);
  };
  protoOf(PersonDetailUiState).lzp = function () {
    var tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.lzk_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.rzk_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).mzp = function (person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) {
    return new PersonDetailUiState(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser);
  };
  protoOf(PersonDetailUiState).szk = function (person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser, $super) {
    person = person === VOID ? this.lzk_1 : person;
    displayPhoneNum = displayPhoneNum === VOID ? this.mzk_1 : displayPhoneNum;
    canSendSms = canSendSms === VOID ? this.nzk_1 : canSendSms;
    clazzes = clazzes === VOID ? this.ozk_1 : clazzes;
    hasChangePasswordPermission = hasChangePasswordPermission === VOID ? this.pzk_1 : hasChangePasswordPermission;
    showPermissionButton = showPermissionButton === VOID ? this.qzk_1 : showPermissionButton;
    isActiveUser = isActiveUser === VOID ? this.rzk_1 : isActiveUser;
    return $super === VOID ? this.mzp(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) : $super.mzp.call(this, person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser);
  };
  protoOf(PersonDetailUiState).toString = function () {
    return 'PersonDetailUiState(person=' + this.lzk_1 + ', displayPhoneNum=' + this.mzk_1 + ', canSendSms=' + this.nzk_1 + ', clazzes=' + this.ozk_1 + ', hasChangePasswordPermission=' + this.pzk_1 + ', showPermissionButton=' + this.qzk_1 + ', isActiveUser=' + this.rzk_1 + ')';
  };
  protoOf(PersonDetailUiState).hashCode = function () {
    var result = this.lzk_1 == null ? 0 : this.lzk_1.hashCode();
    result = imul(result, 31) + (this.mzk_1 == null ? 0 : getStringHashCode(this.mzk_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nzk_1) | 0;
    result = imul(result, 31) + hashCode(this.ozk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pzk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qzk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rzk_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.lzk_1, tmp0_other_with_cast.lzk_1))
      return false;
    if (!(this.mzk_1 == tmp0_other_with_cast.mzk_1))
      return false;
    if (!(this.nzk_1 === tmp0_other_with_cast.nzk_1))
      return false;
    if (!equals(this.ozk_1, tmp0_other_with_cast.ozk_1))
      return false;
    if (!(this.pzk_1 === tmp0_other_with_cast.pzk_1))
      return false;
    if (!(this.qzk_1 === tmp0_other_with_cast.qzk_1))
      return false;
    if (!(this.rzk_1 === tmp0_other_with_cast.rzk_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.vzp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda).azf = function (it, $completion) {
    var tmp = this.jo1(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.azf(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.wzp_1.n7d();
            var tmp_1;
            if (!_get_entityUid__ovkepw(this.vzp_1).equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.xzp_1 = tmp_1;
            if (this.xzp_1 == null) {
              this.yzp_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.xzp_1.mg4(_get_entityUid__ovkepw(this.vzp_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.yzp_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.yzp_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).jo1 = function (it, completion) {
    var i = new PersonEditViewModel$slambda$slambda$slambda(this.vzp_1, completion);
    i.wzp_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.azf(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$slambda_1($savedStateHandle, resultContinuation) {
    this.hzq_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).kzf = 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.kzf($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.hzq_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.hzq_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.kzf($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.fzr_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.mzs(entityToDisplay);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.vzs_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).xzs = function (it, $completion) {
    var tmp = this.jo1(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.xzs(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.wzs_1.f7e().dh5(_get_entityUid__ovkepw(this.vzs_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).jo1 = function (it, completion) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_3(this.vzs_1, completion);
    i.wzs_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.xzs(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).gzt = 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.gzt($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.gzt($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.fzr_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.mzs(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.pzt_1 = this$0;
    this.qzt_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda).szt = 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.szt((!(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.pzt_1, null);
            var tmp_2 = PersonEditViewModel$slambda$slambda$slambda_2(this.qzt_1, null);
            suspendResult = this.pzt_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, PersonEditViewModel$slambda$slambda$lambda(this.pzt_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.pzt_1, this.qzt_1, completion);
    i.rzt_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.szt($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.bzu_1 = this$0;
    this.czu_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda_1).ezu = 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.ezu((!(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.bzu_1).equals(new Long(0, 0))) {
              tmp_2 = PersonEditViewModel$slambda$slambda$slambda_4(this.bzu_1, null);
            } else {
              tmp_2 = null;
            }

            var tmp_3 = tmp_2;
            var tmp_4 = PersonEditViewModel$slambda$slambda$slambda_6(null);
            suspendResult = this.bzu_1.tqq(tmp_0, tmp_1, VOID, tmp_3, tmp_4, PersonEditViewModel$slambda$slambda$lambda_0(this.bzu_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            Companion_getInstance_124();
            var tmp1_elvis_lhs = this_0 == null ? null : this_0.g97_1;
            setIfNoValueSetYet(this.czu_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.bzu_1, this.czu_1, completion);
    i.dzu_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.ezu($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function PersonEditViewModel$onClickSave$slambda$slambda(this$0, $savePerson, $consentToUpsert, resultContinuation) {
    this.nzu_1 = this$0;
    this.ozu_1 = $savePerson;
    this.pzu_1 = $consentToUpsert;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).wzu = function (it, $completion) {
    var tmp = this.jo1(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.wzu(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.nzu_1.rqv_1.equals(new Long(0, 0))) {
              this.hd_1 = 4;
              suspendResult = _get_addNewPersonUseCase__raa2qa(this.nzu_1).npn(this.ozu_1, this.nzu_1.bqq(), true, VOID, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.nzu_1.fqq().n7d().ng4(this.ozu_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.szu_1 = this.pzu_1;
            if (this.szu_1 == null) {
              this.tzu_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              var tmp_0 = this;
              tmp_0.uzu_1 = this.szu_1;
              var tmp_1 = this;
              tmp_1.vzu_1 = this.uzu_1;
              this.hd_1 = 2;
              suspendResult = this.nzu_1.fqq().x7e().ugs(this.vzu_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.tzu_1 = this.uzu_1;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.rzu_1 = this.tzu_1;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.rzu_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return this.rzu_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).jo1 = function (it, completion) {
    var i = new PersonEditViewModel$onClickSave$slambda$slambda(this.nzu_1, this.ozu_1, this.pzu_1, completion);
    i.qzu_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.wzu(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_apiUrlConfig__mldllg_4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.izr_1;
    apiUrlConfig$factory_10();
    return this_0.t2();
  }
  function _get_entityUid__ovkepw($this) {
    Companion_getInstance_117();
    var tmp0_safe_receiver = $this.jqp_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.lzr_1;
    phoneNumValidatorUseCase$factory_0();
    return this_0.t2();
  }
  function _get_genderConfig__kyr0zc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pzr_1;
    genderConfig$factory_2();
    return this_0.t2();
  }
  function _get_enqueueSavePictureUseCase__rl1s31($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qzr_1;
    enqueueSavePictureUseCase$factory_0();
    return this_0.t2();
  }
  function _get_addNewPersonUseCase__raa2qa($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rzr_1;
    addNewPersonUseCase$factory_0();
    return this_0.t2();
  }
  function hasErrors_4(_this__u8e3s4, $this) {
    return ((((((((!(_this__u8e3s4.azs_1 == null) ? true : !(_this__u8e3s4.czs_1 == null)) ? true : !(_this__u8e3s4.ezs_1 == null)) ? true : !(_this__u8e3s4.fzs_1 == null)) ? true : !(_this__u8e3s4.izs_1 == null)) ? true : !(_this__u8e3s4.jzs_1 == null)) ? true : !(_this__u8e3s4.hzs_1 == null)) ? true : !(_this__u8e3s4.dzs_1 == null)) ? true : !(_this__u8e3s4.gzs_1 == null)) ? true : !(_this__u8e3s4.kzs_1 == null);
  }
  function Companion_187() {
    Companion_instance_236 = this;
    this.xzu_1 = 'picState';
    this.yzu_1 = 'PersonEditView';
    this.zzu_1 = 'Register';
    this.azv_1 = listOf(['PersonEditView', 'Register']);
    this.bzv_1 = 'RegMode';
    this.czv_1 = 'DateOfBirth';
    this.dzv_1 = 'RegViaLink';
    this.ezv_1 = 0;
    this.fzv_1 = 1;
    this.gzv_1 = 2;
    var tmp = this;
    Companion_getInstance_117();
    Companion_getInstance_117();
    Companion_getInstance_126();
    Companion_getInstance_126();
    tmp.hzv_1 = listOf(['learningSpaceUrl', 'showAccept', 'popUpToOnFinish', 'next', 'RegViaLink', 'DateOfBirth', 'RegMode', 'noSessionChange']);
    this.izv_1 = 'initDob';
  }
  var Companion_instance_236;
  function Companion_getInstance_204() {
    if (Companion_instance_236 == null)
      new Companion_187();
    return Companion_instance_236;
  }
  function PersonEditViewModel$slambda(this$0, resultContinuation) {
    this.rzv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda).hsg = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda).he = function (p1, $completion) {
    return this.hsg(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.rzv_1.hzr_1 === 0) ? this.rzv_1.rqv_1.equals(new Long(0, 0)) : false) {
              this.tzv_1 = true;
              this.hd_1 = 4;
              continue $sm;
            } else {
              if (!this.rzv_1.rqv_1.equals(new Long(0, 0)) ? this.rzv_1.bqq().equals(this.rzv_1.rqv_1) : false) {
                this.tzv_1 = true;
                this.hd_1 = 4;
                continue $sm;
              } else {
                if (this.rzv_1.rqv_1.equals(new Long(0, 0))) {
                  this.hd_1 = 2;
                  var tmp_0 = this.szv_1.p7f();
                  var tmp_1 = this.rzv_1.bqq();
                  PermissionFlags_getInstance();
                  suspendResult = tmp_0.yi1(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.szv_1.p7f();
                  var tmp_3 = this.rzv_1.bqq();
                  PermissionFlags_getInstance();
                  suspendResult = tmp_2.yi1(tmp_3, new Long(32768, 0), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            }

          case 1:
            this.tzv_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.tzv_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 3:
            throw this.kd_1;
          case 4:
            return this.tzv_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).jo1 = function (db, completion) {
    var i = new PersonEditViewModel$slambda(this.rzv_1, completion);
    i.szv_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.hsg(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.fzr_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mzs(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.czw_1 = this$0;
    this.dzw_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.ezw_1, VOID, VOID, PersonEditViewModel$slambda$slambda_0(this.czw_1, this.dzw_1, null));
            suspendResult = awaitAll([tmp_0, async(this.ezw_1, VOID, VOID, PersonEditViewModel$slambda$slambda_2(this.czw_1, this.dzw_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.czw_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_1;
                if (hasFlag(this.czw_1.hzr_1, 1)) {
                  tmp_1 = this.czw_1.jqq().vol(strings_getInstance().uml_1);
                } else {
                  tmp_1 = this.czw_1.jqq().vol(strings_getInstance().on4_1);
                }
                var tmp_2 = tmp_1;
                var nextValue = prevValue.vq8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_2, VOID, PersonEditViewModel$onClickSave$ref(this.czw_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp_3;
            if (hasFlag(this.czw_1.hzr_1, 2)) {
              tmp_3 = new PersonParentJoin();
            } else {
              tmp_3 = null;
            }

            var personParentJoin = tmp_3;
            l$ret$3: do {
              var this_1 = this.czw_1.fzr_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mzs(VOID, VOID, VOID, VOID, true, personParentJoin);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.czw_1.lqq(Companion_getInstance_98().dq9_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.czw_1, this.dzw_1, completion);
    i.ezw_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.ozr_1.ypg(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, '');
      return Unit_instance;
    };
  }
  function PersonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.nzw_1 = $commitDelay;
    this.ozw_1 = $entity;
    this.pzw_1 = $this;
    this.qzw_1 = $key;
    this.rzw_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.nzw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ozw_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.pzw_1.pqq(this.pzw_1.jqp_1, this.qzw_1, this.rzw_1, this.ozw_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.nzw_1, this.ozw_1, this.pzw_1, this.qzw_1, this.rzw_1, completion);
    i.szw_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.bzx_1 = this$0;
    this.czx_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.bzx_1.pqq(this.bzx_1.jqp_1, 'picState', Companion_instance_7.n4r(), this.czx_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.bzx_1, this.czx_1, completion);
    i.dzx_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.mzx_1 = $isRegistrationMode;
    this.nzx_1 = this$0;
    this.ozx_1 = $savePerson;
    this.pzx_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.mzx_1) {
              this.rzx_1 = this.nzx_1.fzr_1.t2().yzr_1;
              this.szx_1 = this.nzx_1.fzr_1.t2().uzr_1;
              var tmp_0 = this;
              var tmp$ret$0;
              l$ret$1: do {
                var this_0 = this.nzx_1.fzr_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_1;
                  var this_1 = this.ozx_1.g96_1;
                  if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
                    tmp_1 = this.pzx_1;
                  } else {
                    tmp_1 = null;
                  }
                  var tmp3_usernameError = tmp_1;
                  var tmp_2;
                  var this_2 = this.szx_1;
                  if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
                    tmp_2 = this.pzx_1;
                  } else {
                    tmp_2 = null;
                  }
                  var tmp4_passwordError = tmp_2;
                  var tmp_3;
                  if (!hasFlag(this.nzx_1.hzr_1, 2)) {
                    tmp_3 = null;
                  } else {
                    var tmp0_safe_receiver = this.rzx_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.pzx_1;
                    } else {
                      var tmp1_safe_receiver = this.rzx_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.nzx_1.mzr_1.zpb(tmp2_safe_receiver);
                      }
                      if (tmp_4 == null) {
                        tmp_3 = this.nzx_1.jqq().vol(strings_getInstance().znb_1);
                      } else {
                        tmp_3 = null;
                      }
                    }
                  }
                  var tmp5_parentContactError = tmp_3;
                  var tmp_5;
                  if (this.ozx_1.o96_1.equals(new Long(0, 0))) {
                    tmp_5 = this.pzx_1;
                  } else {
                    tmp_5 = null;
                  }
                  var tmp6_dateOfBirthError = tmp_5;
                  var nextValue = prevValue.mzs(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.tzx_1 = tmp$ret$0;
              if (hasErrors_4(this.tzx_1, this.nzx_1) ? true : this.szx_1 == null) {
                this.nzx_1.lqq(Companion_getInstance_98().dq9_1);
                l$ret$3: do {
                  var this_4 = this.nzx_1.fzr_1;
                  while (true) {
                    var prevValue_0 = this_4.t2();
                    var nextValue_0 = prevValue_0.mzs(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.nzx_1.rqv_1.equals(new Long(0, 0)) ? isDateOfBirthAMinor(Companion_getInstance_6().mmi(this.ozx_1.o96_1)) : false) {
                var tmp_7 = Companion_getInstance_6();
                var tmp0_safe_receiver_0 = this.nzx_1.jqp_1.ba('initDob');
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
                tmp_6 = !isDateOfBirthAMinor(tmp_7.mmi(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs));
              } else {
                tmp_6 = false;
              }
              if (tmp_6) {
                this.hd_1 = 1;
                suspendResult = this.nzx_1.fqq().x7e().ygs(this.ozx_1.f96_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.wzx_1 = false;
                this.hd_1 = 2;
                continue $sm;
              }
            }

          case 1:
            this.xzx_1 = suspendResult;
            this.wzx_1 = !this.xzx_1;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.wzx_1) {
              var tmp_8 = this;
              var this_5 = new PersonParentJoin();
              this_5.fg8_1 = this.ozx_1.f96_1;
              this_5.eg8_1 = this.nzx_1.zqp().toc().cl0_1;
              var tmp_9 = this_5;
              tmp_9.kg8_1 = 1;
              this_5.lg8_1 = systemTimeInMillis();
              tmp_8.vzx_1 = this_5;
              this.hd_1 = 3;
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.vzx_1 = null;
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            this.yzx_1 = this.vzx_1;
            this.hd_1 = 4;
            var tmp_11 = this.nzx_1.fqq();
            suspendResult = withDoorTransactionAsync(tmp_11, VOID, PersonEditViewModel$onClickSave$slambda$slambda_0(this.nzx_1, this.ozx_1, this.yzx_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.zzx_1 = this.nzx_1.fzr_1.t2().wzr_1;
            if (!(this.zzx_1 == null)) {
              this.zzx_1.e97_1 = this.ozx_1.f96_1;
              this.zzx_1.f97_1 = systemTimeInMillis();
              var tmp_12 = this;
              Companion_getInstance_124();
              var tmp2_elvis_lhs = this.nzx_1.jqp_1.ba('initPicUri');
              tmp_12.azy_1 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
              this.bzy_1 = this.zzx_1.g97_1;
              if (!(this.azy_1 === this.bzy_1)) {
                this.hd_1 = 5;
                suspendResult = this.nzx_1.dqq().f7e().ch5(this.zzx_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.nzx_1);
            var tmp_14 = this.ozx_1.f96_1;
            suspendResult = tmp_13.gou(tmp_14, 50, this.bzy_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.czy_1 = this.nzx_1.jqp_1.ba('goToOnPersonSelected');
            if (!(this.czy_1 == null)) {
              var tmp_16 = UMFileUtil_getInstance().parseURLQueryString(this.czy_1);
              Companion_getInstance_117();
              var args = plus_0(tmp_16, mapOf_0(to('personUid', this.ozx_1.f96_1.toString())));
              this.nzx_1.lqp_1.wp8(substringBefore_0(this.czy_1, '?'), args);
            } else {
              this.nzx_1.tqv('PersonDetailView', this.ozx_1.f96_1, this.ozx_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.nzx_1.zqp().zoc(this.ozx_1, this.szx_1, this.nzx_1.jzr_1, new AccountRegisterOptions(!hasFlag(this.nzx_1.hzr_1, 2) ? !this.nzx_1.szr_1 : false, this.rzx_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.nzx_1.hzr_1, 2)) {
              var goOptions = new UstadGoOptions('RegisterAgeRedirect', true);
              var this_6 = LinkedHashMap_init_$Create$();
              var key = 'username';
              var tmp0_elvis_lhs = this.ozx_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.rzx_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.nzx_1.fzr_1.t2().uzr_1;
              var value_1 = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
              this_6.s(key_1, value_1);
              Companion_getInstance_117();
              putFromSavedStateIfPresent(this_6, this.nzx_1.jqp_1, 'popUpToOnFinish');
              var args_0 = this_6;
              this.nzx_1.lqp_1.uqb('WaitForParent', args_0, goOptions);
              tmp_18 = Unit_instance;
            } else {
              this.nzx_1.vqw(this.nzx_1.lqp_1, appendSelectedAccount(this.nzx_1.kzr_1, registeredPerson.f96_1, new LearningSpace(this.nzx_1.jzr_1)), new UstadGoOptions(VOID, VOID, true));
              tmp_18 = Unit_instance;
            }

            tmp_17.uzx_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.nzx_1.fzr_1;
                  while (true) {
                    var prevValue_1 = this_7.t2();
                    var nextValue_1 = prevValue_1.mzs(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.nzx_1.jqq().vol(strings_getInstance().fn9_1));
                    if (this_7.y1k(prevValue_1, nextValue_1)) {
                      break l$ret$7;
                    }
                  }
                }
                 while (false);
              } else {
                this.nzx_1.hqq().kq9(new Snack(this.nzx_1.jqq().vol(strings_getInstance().hmk_1)));
              }
              this.dzy_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.nzx_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$11: do {
              var this_8 = this.nzx_1.fzr_1;
              while (true) {
                var prevValue_2 = this_8.t2();
                var nextValue_2 = prevValue_2.mzs(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.nzx_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$13: do {
              var this_9 = this.nzx_1.fzr_1;
              while (true) {
                var prevValue_3 = this_9.t2();
                var nextValue_3 = prevValue_3.mzs(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.nzx_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$15: do {
              var this_10 = this.nzx_1.fzr_1;
              while (true) {
                var prevValue_4 = this_10.t2();
                var nextValue_4 = prevValue_4.mzs(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.mzx_1, this.nzx_1, this.ozx_1, this.pzx_1, completion);
    i.qzx_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_204();
    destName = destName === VOID ? 'PersonEditView' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.fzr_1 = MutableStateFlow(new PersonEditUiState());
    this.gzr_1 = asStateFlow(this.fzr_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.hzr_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.izr_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_9());
    var tmp_2 = this;
    Companion_getInstance_117();
    var tmp0_elvis_lhs = savedStateHandle.ba('learningSpaceUrl');
    var tmp1_elvis_lhs_0 = tmp0_elvis_lhs == null ? _get_apiUrlConfig__mldllg_4(this).io8_1 : tmp0_elvis_lhs;
    tmp_2.jzr_1 = tmp1_elvis_lhs_0 == null ? 'http://localhost' : tmp1_elvis_lhs_0;
    var tmp_3 = this;
    Companion_getInstance_117();
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('next');
    tmp_3.kzr_1 = tmp0_elvis_lhs_0 == null ? this.jqq().pq7() : 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.lzr_1 = Instance(this, tmp$ret$2, null).a5d(this, phoneNumValidatorUseCase$factory());
    this.mzr_1 = new ValidateEmailUseCase();
    this.nzr_1 = new ValidateUsernameUseCase();
    this.ozr_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.pzr_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.zqp().voc();
    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.qzr_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.rzr_1 = Instance(this_1, tmp$ret$11, null).a5d(this, addNewPersonUseCase$factory());
    var tmp_14 = this;
    Companion_getInstance_126();
    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.szr_1 = tmp1_elvis_lhs_1 == null ? false : tmp1_elvis_lhs_1;
    this.lqq(Companion_getInstance_98().cq9_1);
    var tmp_15;
    if (hasFlag(this.hzr_1, 1)) {
      tmp_15 = this.jqq().vol(strings_getInstance().unm_1);
    } else {
      tmp_15 = _get_entityUid__ovkepw(this).equals(new Long(0, 0)) ? this.jqq().vol(strings_getInstance().an3_1) : this.jqq().vol(strings_getInstance().bn3_1);
    }
    var title = tmp_15;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.nqp_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>' call
        var tmp0_navigationVisible = !hasFlag(this.hzr_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.fzr_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.mzs(VOID, VOID, _get_genderConfig__kyr0zc_0(this).uq9_1, VOID, VOID, VOID, this.hzr_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.uqq(tmp_16, true, tmp_17, PersonEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(PersonEditViewModel).izi = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fzr_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.fzr_1.t2().tzr_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.tzr_1;
        var tmp_2 = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.l96_1;
        var tmp16_genderError = this.uqw(tmp_2, entity == null ? null : entity.l96_1, prevValue.hzs_1);
        var tmp9_safe_receiver = prevValue.tzr_1;
        var tmp_3 = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.h96_1;
        var tmp17_firstNameError = this.uqw(tmp_3, entity == null ? null : entity.h96_1, prevValue.izs_1);
        var tmp11_safe_receiver = prevValue.tzr_1;
        var tmp_4 = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.i96_1;
        var tmp18_lastNameError = this.uqw(tmp_4, entity == null ? null : entity.i96_1, prevValue.jzs_1);
        var tmp13_safe_receiver = prevValue.tzr_1;
        var tmp_5 = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.k96_1;
        var tmp19_phoneNumError = this.uqw(tmp_5, entity == null ? null : entity.k96_1, prevValue.kzs_1);
        var tmp5_safe_receiver = prevValue.tzr_1;
        var tmp_6 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.j96_1;
        var tmp20_emailError = this.uqw(tmp_6, entity == null ? null : entity.j96_1, prevValue.dzs_1);
        var tmp3_safe_receiver = prevValue.tzr_1;
        var tmp_7 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.g96_1;
        var tmp21_usernameError = this.uqw(tmp_7, entity == null ? null : entity.g96_1, prevValue.azs_1);
        var nextValue = prevValue.mzs(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_126();
    var key = 'entityState';
    var tmp0_safe_receiver = this.qqv_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_8 = this;
    var tmp_9 = this.aqq();
    tmp_8.qqv_1 = launch(tmp_9, VOID, VOID, PersonEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(PersonEditViewModel).ezy = function (password) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fzr_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.mzs(VOID, password, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PersonEditViewModel).fzy = 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.fzr_1.t2().wzr_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.fzr_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPersonPictureChanged.<anonymous>' call
        var nextValue = prevValue.mzs(VOID, VOID, VOID, personPicture);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.aqq();
    launch(tmp_0, VOID, VOID, PersonEditViewModel$onPersonPictureChanged$slambda_0(this, personPicture, null));
  };
  protoOf(PersonEditViewModel).gzy = function (personParentJoin) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fzr_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onApprovalPersonParentJoinChanged.<anonymous>' call
        var nextValue = prevValue.mzs(VOID, VOID, VOID, VOID, VOID, personParentJoin);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PersonEditViewModel).hzy = function (phoneNumSet) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.fzr_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().lzs_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.mzs(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).vsd = function () {
    if (!this.fzr_1.t2().xzr_1)
      return Unit_instance;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fzr_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.mzs(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.lqq(Companion_getInstance_98().cq9_1);
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.fzr_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.mzs(VOID, VOID, VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp0_safe_receiver = this.fzr_1.t2().tzr_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.jqq().vol(strings_getInstance().cmp_1);
    var currentTime = systemTimeInMillis();
    var isRegistrationMode = hasFlag(this.hzr_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.mzr_1.zpb(tmp2_safe_receiver);
    }
    var validatedEmailAddr = tmp_1;
    var tmp_2;
    if (isRegistrationMode) {
      var tmp3_elvis_lhs = savePerson.g96_1;
      tmp_2 = this.nzr_1.zpb(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.fzr_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.dpr_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.jqq().vol(strings_getInstance().rmr_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.jqq().vol(strings_getInstance().cmp_1);
        } else {
          tmp_5 = null;
        }
        var tmp4_passwordError = tmp_5;
        var tmp_7;
        if (savePerson.o96_1.c7(currentTime) > 0) {
          tmp_7 = this.jqq().vol(strings_getInstance().rmr_1);
        } else if (isRegistrationMode ? !isDateSet(savePerson.o96_1) : false) {
          tmp_7 = this.jqq().vol(strings_getInstance().cmp_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.fzr_1.t2().lzs_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).npj(tmp2_safe_receiver_0);
          }
          tmp_13 = !(tmp_14 === true);
        } else {
          tmp_13 = false;
        }
        if (tmp_13) {
          tmp_12 = this.jqq().vol(strings_getInstance().rmr_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.jqq().vol(strings_getInstance().rmr_1);
        } else {
          tmp_15 = null;
        }
        var tmp10_emailError = tmp_15;
        var nextValue_1 = prevValue_1.mzs(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.fzr_1.t2(), this)) {
      this.lqq(Companion_getInstance_98().dq9_1);
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_7 = this.fzr_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.mzs(VOID, VOID, VOID, VOID, true);
          if (this_7.y1k(prevValue_2, nextValue_2)) {
            break $l$block_2;
          }
        }
      }
      return Unit_instance;
    }
    var tmp_17 = this.aqq();
    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().wq9_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.tzr_1 = person;
    this.uzr_1 = password;
    this.vzr_1 = genderOptions;
    this.wzr_1 = personPicture;
    this.xzr_1 = fieldsEnabled;
    this.yzr_1 = approvalPersonParentJoin;
    this.zzr_1 = registrationMode;
    this.azs_1 = usernameError;
    this.bzs_1 = passwordConfirmedError;
    this.czs_1 = passwordError;
    this.dzs_1 = emailError;
    this.ezs_1 = confirmError;
    this.fzs_1 = dateOfBirthError;
    this.gzs_1 = parentContactError;
    this.hzs_1 = genderError;
    this.izs_1 = firstNameError;
    this.jzs_1 = lastNameError;
    this.kzs_1 = phoneNumError;
    this.lzs_1 = nationalPhoneNumSet;
  }
  protoOf(PersonEditUiState).izy = function () {
    return !(this.yzr_1 == null);
  };
  protoOf(PersonEditUiState).bzp = function () {
    return !hasFlag(this.zzr_1, 1);
  };
  protoOf(PersonEditUiState).qz2 = function () {
    return hasFlag(this.zzr_1, 1);
  };
  protoOf(PersonEditUiState).jzy = function () {
    return hasFlag(this.zzr_1, 1);
  };
  protoOf(PersonEditUiState).hzp = function () {
    return !hasFlag(this.zzr_1, 2);
  };
  protoOf(PersonEditUiState).gzp = function () {
    return !hasFlag(this.zzr_1, 2);
  };
  protoOf(PersonEditUiState).fzp = function () {
    return !hasFlag(this.zzr_1, 2);
  };
  protoOf(PersonEditUiState).kzy = 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).mzs = 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.tzr_1 : person;
    password = password === VOID ? this.uzr_1 : password;
    genderOptions = genderOptions === VOID ? this.vzr_1 : genderOptions;
    personPicture = personPicture === VOID ? this.wzr_1 : personPicture;
    fieldsEnabled = fieldsEnabled === VOID ? this.xzr_1 : fieldsEnabled;
    approvalPersonParentJoin = approvalPersonParentJoin === VOID ? this.yzr_1 : approvalPersonParentJoin;
    registrationMode = registrationMode === VOID ? this.zzr_1 : registrationMode;
    usernameError = usernameError === VOID ? this.azs_1 : usernameError;
    passwordConfirmedError = passwordConfirmedError === VOID ? this.bzs_1 : passwordConfirmedError;
    passwordError = passwordError === VOID ? this.czs_1 : passwordError;
    emailError = emailError === VOID ? this.dzs_1 : emailError;
    confirmError = confirmError === VOID ? this.ezs_1 : confirmError;
    dateOfBirthError = dateOfBirthError === VOID ? this.fzs_1 : dateOfBirthError;
    parentContactError = parentContactError === VOID ? this.gzs_1 : parentContactError;
    genderError = genderError === VOID ? this.hzs_1 : genderError;
    firstNameError = firstNameError === VOID ? this.izs_1 : firstNameError;
    lastNameError = lastNameError === VOID ? this.jzs_1 : lastNameError;
    phoneNumError = phoneNumError === VOID ? this.kzs_1 : phoneNumError;
    nationalPhoneNumSet = nationalPhoneNumSet === VOID ? this.lzs_1 : nationalPhoneNumSet;
    return $super === VOID ? this.kzy(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) : $super.kzy.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.tzr_1 + ', password=' + this.uzr_1 + ', genderOptions=' + this.vzr_1 + ', personPicture=' + this.wzr_1 + ', fieldsEnabled=' + this.xzr_1 + ', approvalPersonParentJoin=' + this.yzr_1 + ', registrationMode=' + this.zzr_1 + ', usernameError=' + this.azs_1 + ', passwordConfirmedError=' + this.bzs_1 + ', passwordError=' + this.czs_1 + ', emailError=' + this.dzs_1 + ', confirmError=' + this.ezs_1 + ', dateOfBirthError=' + this.fzs_1 + ', parentContactError=' + this.gzs_1 + ', genderError=' + this.hzs_1 + ', firstNameError=' + this.izs_1 + ', lastNameError=' + this.jzs_1 + ', phoneNumError=' + this.kzs_1 + ', nationalPhoneNumSet=' + this.lzs_1 + ')';
  };
  protoOf(PersonEditUiState).hashCode = function () {
    var result = this.tzr_1 == null ? 0 : this.tzr_1.hashCode();
    result = imul(result, 31) + (this.uzr_1 == null ? 0 : getStringHashCode(this.uzr_1)) | 0;
    result = imul(result, 31) + hashCode(this.vzr_1) | 0;
    result = imul(result, 31) + (this.wzr_1 == null ? 0 : this.wzr_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xzr_1) | 0;
    result = imul(result, 31) + (this.yzr_1 == null ? 0 : this.yzr_1.hashCode()) | 0;
    result = imul(result, 31) + this.zzr_1 | 0;
    result = imul(result, 31) + (this.azs_1 == null ? 0 : getStringHashCode(this.azs_1)) | 0;
    result = imul(result, 31) + (this.bzs_1 == null ? 0 : getStringHashCode(this.bzs_1)) | 0;
    result = imul(result, 31) + (this.czs_1 == null ? 0 : getStringHashCode(this.czs_1)) | 0;
    result = imul(result, 31) + (this.dzs_1 == null ? 0 : getStringHashCode(this.dzs_1)) | 0;
    result = imul(result, 31) + (this.ezs_1 == null ? 0 : getStringHashCode(this.ezs_1)) | 0;
    result = imul(result, 31) + (this.fzs_1 == null ? 0 : getStringHashCode(this.fzs_1)) | 0;
    result = imul(result, 31) + (this.gzs_1 == null ? 0 : getStringHashCode(this.gzs_1)) | 0;
    result = imul(result, 31) + (this.hzs_1 == null ? 0 : getStringHashCode(this.hzs_1)) | 0;
    result = imul(result, 31) + (this.izs_1 == null ? 0 : getStringHashCode(this.izs_1)) | 0;
    result = imul(result, 31) + (this.jzs_1 == null ? 0 : getStringHashCode(this.jzs_1)) | 0;
    result = imul(result, 31) + (this.kzs_1 == null ? 0 : getStringHashCode(this.kzs_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lzs_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.tzr_1, tmp0_other_with_cast.tzr_1))
      return false;
    if (!(this.uzr_1 == tmp0_other_with_cast.uzr_1))
      return false;
    if (!equals(this.vzr_1, tmp0_other_with_cast.vzr_1))
      return false;
    if (!equals(this.wzr_1, tmp0_other_with_cast.wzr_1))
      return false;
    if (!(this.xzr_1 === tmp0_other_with_cast.xzr_1))
      return false;
    if (!equals(this.yzr_1, tmp0_other_with_cast.yzr_1))
      return false;
    if (!(this.zzr_1 === tmp0_other_with_cast.zzr_1))
      return false;
    if (!(this.azs_1 == tmp0_other_with_cast.azs_1))
      return false;
    if (!(this.bzs_1 == tmp0_other_with_cast.bzs_1))
      return false;
    if (!(this.czs_1 == tmp0_other_with_cast.czs_1))
      return false;
    if (!(this.dzs_1 == tmp0_other_with_cast.dzs_1))
      return false;
    if (!(this.ezs_1 == tmp0_other_with_cast.ezs_1))
      return false;
    if (!(this.fzs_1 == tmp0_other_with_cast.fzs_1))
      return false;
    if (!(this.gzs_1 == tmp0_other_with_cast.gzs_1))
      return false;
    if (!(this.hzs_1 == tmp0_other_with_cast.hzs_1))
      return false;
    if (!(this.izs_1 == tmp0_other_with_cast.izs_1))
      return false;
    if (!(this.jzs_1 == tmp0_other_with_cast.jzs_1))
      return false;
    if (!(this.kzs_1 == tmp0_other_with_cast.kzs_1))
      return false;
    if (!(this.lzs_1 === tmp0_other_with_cast.lzs_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.tzy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceListViewModel$slambda$slambda$slambda).vzy = function (learningSpaceList, $completion) {
    var tmp = this.wzy(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.vzy((!(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.tzy_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.zzy(VOID, this.uzy_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).wzy = function (learningSpaceList, completion) {
    var i = new LearningSpaceListViewModel$slambda$slambda$slambda(this.tzy_1, completion);
    i.uzy_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.vzy(learningSpaceList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LearningSpaceListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.izz_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.izz_1.l100_1.fl5();
            var tmp_1 = LearningSpaceListViewModel$slambda$slambda$slambda_0(this.izz_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.izz_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.j100_1;
    impl$factory_4();
    return this_0.t2();
  }
  function _get_goToLearningSpaceUseCase__yq7hh5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.k100_1;
    goToLearningSpaceUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_188() {
    this.m100_1 = 'LearningSpaceList';
    this.n100_1 = 'stateUrl';
  }
  var Companion_instance_237;
  function Companion_getInstance_205() {
    return Companion_instance_237;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_35(function_0) {
    this.o100_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_35).t1d = function (value, $completion) {
    return this.o100_1(value, $completion);
  };
  function LearningSpaceListViewModel$slambda(this$0, resultContinuation) {
    this.x100_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.x100_1.eqy_1, LearningSpaceListViewModel$slambda$slambda_0(this.x100_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.x100_1, completion);
    i.y100_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.j100_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.k100_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.l100_1 = tmp_4.d58(tmp$ret$4, null).cl4();
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_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).vol(strings_getInstance().qnr_1);
        var nextValue = prevValue.vq8(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.eqy_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_237.n100_1);
        var nextValue_0 = prevValue_0.zzy(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_6 = this.aqq();
    launch(tmp_6, VOID, VOID, LearningSpaceListViewModel$slambda_0(this, null));
  }
  protoOf(LearningSpaceListViewModel).jwo = function () {
    Companion_getInstance_220();
    // 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_126();
    this.wqq(this_0, 'next');
    this.xqq(this_0, Companion_getInstance_215().vr9_1);
    var tmp$ret$2 = this_0.f3();
    this.lqp_1.wp8('LearningSpaceEnterLink', tmp$ret$2);
  };
  protoOf(LearningSpaceListViewModel).z100 = function (learningSpace) {
    var tmp;
    Companion_getInstance_215();
    var tmp_0 = this.jqp_1.ba('newOrExisting');
    Companion_getInstance_215();
    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_126();
    this.wqq(this_0, 'next');
    this.xqq(this_0, Companion_getInstance_215().vr9_1);
    Companion_getInstance_117();
    this_0.s('learningSpaceUrl', learningSpace);
    var args = this_0.f3();
    _get_goToLearningSpaceUseCase__yq7hh5(this).tpk(learningSpace, this.lqp_1, args, viewName);
  };
  protoOf(LearningSpaceListViewModel).yqy = function (searchText) {
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(LearningSpaceListViewModel).zqy = function () {
  };
  function LearningSpaceListUiState(siteLink, learningSpaces) {
    siteLink = siteLink === VOID ? '' : siteLink;
    learningSpaces = learningSpaces === VOID ? emptyList() : learningSpaces;
    this.xzy_1 = siteLink;
    this.yzy_1 = learningSpaces;
  }
  protoOf(LearningSpaceListUiState).a101 = function (siteLink, learningSpaces) {
    return new LearningSpaceListUiState(siteLink, learningSpaces);
  };
  protoOf(LearningSpaceListUiState).zzy = function (siteLink, learningSpaces, $super) {
    siteLink = siteLink === VOID ? this.xzy_1 : siteLink;
    learningSpaces = learningSpaces === VOID ? this.yzy_1 : learningSpaces;
    return $super === VOID ? this.a101(siteLink, learningSpaces) : $super.a101.call(this, siteLink, learningSpaces);
  };
  protoOf(LearningSpaceListUiState).toString = function () {
    return 'LearningSpaceListUiState(siteLink=' + this.xzy_1 + ', learningSpaces=' + this.yzy_1 + ')';
  };
  protoOf(LearningSpaceListUiState).hashCode = function () {
    var result = getStringHashCode(this.xzy_1);
    result = imul(result, 31) + hashCode(this.yzy_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.xzy_1 === tmp0_other_with_cast.xzy_1))
      return false;
    if (!equals(this.yzy_1, tmp0_other_with_cast.yzy_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.k101_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda$slambda).uqh = function (hasPermissionToList, $completion) {
    var tmp = this.vqh(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.uqh((!(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.k101_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              if (this.l101_1) {
                tmp_0 = this.k101_1.q102_1;
              } else {
                tmp_0 = PersonListViewModel$slambda$slambda$slambda$lambda;
              }
              var tmp0_personList = tmp_0;
              var tmp1_showInviteViaLink = !(this.k101_1.r102_1 == null);
              var tmp2_inviteCode = this.k101_1.r102_1;
              var tmp3_showInviteViaContact = this.k101_1.s102_1;
              var nextValue = prevValue.e103(tmp0_personList, VOID, VOID, VOID, tmp1_showInviteViaLink, tmp3_showInviteViaContact, tmp2_inviteCode, this.l101_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.k101_1.nqp_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.vq8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.nq8_1.fq8(this.l101_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).vqh = function (hasPermissionToList, completion) {
    var i = new PersonListViewModel$slambda$slambda$slambda(this.k101_1, completion);
    i.l101_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.uqh(hasPermissionToList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel$slambda$slambda($hasPermissionToListFlow, this$0, resultContinuation) {
    this.n103_1 = $hasPermissionToListFlow;
    this.o103_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.n103_1);
            var tmp_1 = PersonListViewModel$slambda$slambda$slambda_0(this.o103_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.n103_1, this.o103_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.x103_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda_1).htb = function (it, $completion) {
    var tmp = this.itb(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.htb(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.y103_1;
          var hasAddPermission = tmp0_container.y6();
          var hasViewAllPermission = tmp0_container.z6();
          var hasBulkAddPermission = hasAddPermission ? hasViewAllPermission : false;
          l$ret$1: do {
            var this_0 = this.x103_1.eqy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.e103(VOID, VOID, VOID, this.x103_1.jqy().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.x103_1.nqp_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.vq8(prevValue_0.gq8_1.bq9(this.x103_1.jqy().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).itb = function (it, completion) {
    var i = new PersonListViewModel$slambda$slambda_1(this.x103_1, completion);
    i.y103_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.htb(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_setClipboardStringUseCase__31i1s1_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.t102_1;
    setClipboardStringUseCase$factory_4();
    return this_0.t2();
  }
  function onClickFab($this) {
    if ($this.eqy_1.t2().d103_1) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = $this.eqy_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickFab.<anonymous>' call
          var nextValue = prevValue.e103(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    } else {
      $this.zqy();
    }
  }
  function Companion_189() {
    Companion_instance_238 = this;
    this.z103_1 = 'People';
    this.a104_1 = 'PersonListHome';
    this.b104_1 = listOf(['People', 'PersonListHome']);
    this.c104_1 = 'exlcudeFromClazz';
    this.d104_1 = 'excludeAlreadySelectedList';
    this.e104_1 = 'showAddViaInviteLink';
    this.f104_1 = 'showAddViaContact';
    this.g104_1 = 'role';
    this.h104_1 = 'rptsl';
  }
  var Companion_instance_238;
  function Companion_getInstance_206() {
    if (Companion_instance_238 == null)
      new Companion_189();
    return Companion_instance_238;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_36(function_0) {
    this.i104_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_36).t1d = function (value, $completion) {
    return this.i104_1(value, $completion);
  };
  function PersonListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fqq().n7d().og4(getSystemTimeInMillis(), this$0.m102_1, this$0.o102_1, this$0.bqq(), this$0.eqy_1.t2().w102_1.cqf_1, toQueryLikeParam(this$0.nqp_1.t2().nq8_1.cq8_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.r104_1 = this$0;
    this.s104_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.r104_1.eqy_1, PersonListViewModel$slambda$slambda_0(this.s104_1, this.r104_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.r104_1, this.s104_1, completion);
    i.t104_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.c105_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.c105_1.fqq().p7f();
            var tmp_1 = this.c105_1.bqq();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1024, 0);
            PermissionFlags_getInstance();
            var tmp_3 = tmp_0.ai2(tmp_1, tmp_2, new Long(8192, 0));
            var tmp_4 = PersonListViewModel$slambda$slambda_2(this.c105_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.c105_1, completion);
    i.d105_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_206();
    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.m102_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.n102_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.o102_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.p102_1 = tmp1_elvis_lhs_1 == null ? new Long(0, 0) : tmp1_elvis_lhs_1;
    var tmp_6 = this;
    tmp_6.q102_1 = PersonListViewModel$pagingSourceFactory$lambda(this);
    this.r102_1 = savedStateHandle.ba('showAddViaInviteLink');
    this.s102_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.t102_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.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.<anonymous>' call
        var tmp1_searchState = this.mqz(false);
        Companion_getInstance_126();
        var tmp0_elvis_lhs = savedStateHandle.ba('t');
        var tmp2_title = tmp0_elvis_lhs == null ? this.vqz(strings_getInstance().cmw_1, strings_getInstance().xnm_1) : tmp0_elvis_lhs;
        var tmp_9 = this.jqq().vol(strings_getInstance().zn2_1);
        var tmp_10 = FabIcon_ADD_getInstance();
        var tmp3_fabState = new FabUiState(VOID, tmp_9, tmp_10, PersonListViewModel$onClickFab$ref(this));
        var nextValue = prevValue.vq8(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.p102_1.equals(new Long(0, 0))) {
      tmp_11 = flowOf(true);
    } else {
      tmp_11 = this.fqq().p7f().zi1(this.bqq(), this.p102_1);
    }
    var hasPermissionToListFlow = tmp_11;
    var tmp_12 = this.aqq();
    launch(tmp_12, VOID, VOID, PersonListViewModel$slambda_0(this, hasPermissionToListFlow, null));
    var tmp_13 = this.aqq();
    launch(tmp_13, VOID, VOID, PersonListViewModel$slambda_2(this, null));
  }
  protoOf(PersonListViewModel).yqy = function (searchText) {
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(PersonListViewModel).it3 = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.e103(VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.gqy_1.i1h(new RefreshCommand());
  };
  protoOf(PersonListViewModel).e105 = function () {
    if (this.r102_1 == null)
      return Unit_instance;
    Companion_getInstance_126();
    this.lqp_1.wp8('InviteWithLink', mapOf_0(to('inviteCode', this.r102_1)));
  };
  protoOf(PersonListViewModel).f105 = function () {
    var tmp0_safe_receiver = this.eqy_1.t2().a103_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).bp4(tmp0_safe_receiver);
      this.hqq().kq9(new Snack(this.jqq().vol(strings_getInstance().cna_1)));
    }
  };
  protoOf(PersonListViewModel).g105 = 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.n102_1.toString());
    this_0.s('clazz_uid', this.m102_1.toString());
    var args = this_0.f3();
    this.lqp_1.wp8('invite_via_contact', args);
  };
  protoOf(PersonListViewModel).h105 = function () {
    this.lqp_1.wp8('BulkAddPersonSelectFile', emptyMap());
  };
  protoOf(PersonListViewModel).zqy = function () {
    Companion_getInstance_204();
    var tmp0_safe_receiver = this.jqp_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.rqz('PersonEditView', tmp1_elvis_lhs == null ? emptyMap() : tmp1_elvis_lhs);
  };
  protoOf(PersonListViewModel).i105 = function (entry) {
    var goToOnPersonSelected = this.jqp_1.ba('goToOnPersonSelected');
    if (!(goToOnPersonSelected == null)) {
      var tmp = UMFileUtil_getInstance().parseURLQueryString(goToOnPersonSelected);
      Companion_getInstance_117();
      var args = plus_0(tmp, mapOf_0(to('personUid', entry.f96_1.toString())));
      var goToDestName = substringBefore_0(goToOnPersonSelected, '?');
      var popUpTo = this.jqp_1.ba('popUpToOnPersonSelected');
      this.lqp_1.uqb(goToDestName, args, new UstadGoOptions(popUpTo, true));
    } else {
      this.uqz('PersonDetailView', entry.f96_1, entry);
    }
  };
  protoOf(PersonListViewModel).j105 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onDismissAddSheetOrDialog.<anonymous>' call
        var nextValue = prevValue.e103(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().jml_1;
      var tmp_2 = new SortOrderOption(tmp_1, 1, true);
      var tmp_3 = strings_getInstance().jml_1;
      var tmp_4 = new SortOrderOption(tmp_3, 2, false);
      var tmp_5 = strings_getInstance().iml_1;
      var tmp_6 = new SortOrderOption(tmp_5, 3, true);
      var tmp_7 = strings_getInstance().iml_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.u102_1 = personList;
    this.v102_1 = sortOptions;
    this.w102_1 = sortOption;
    this.x102_1 = showAddItem;
    this.y102_1 = showInviteViaLink;
    this.z102_1 = showInviteViaContact;
    this.a103_1 = inviteCode;
    this.b103_1 = showSortOptions;
    this.c103_1 = addSheetOrDialogVisible;
    this.d103_1 = hasBulkImportPermission;
  }
  protoOf(PersonListUiState).k105 = 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).e103 = function (personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission, $super) {
    personList = personList === VOID ? this.u102_1 : personList;
    sortOptions = sortOptions === VOID ? this.v102_1 : sortOptions;
    sortOption = sortOption === VOID ? this.w102_1 : sortOption;
    showAddItem = showAddItem === VOID ? this.x102_1 : showAddItem;
    showInviteViaLink = showInviteViaLink === VOID ? this.y102_1 : showInviteViaLink;
    showInviteViaContact = showInviteViaContact === VOID ? this.z102_1 : showInviteViaContact;
    inviteCode = inviteCode === VOID ? this.a103_1 : inviteCode;
    showSortOptions = showSortOptions === VOID ? this.b103_1 : showSortOptions;
    addSheetOrDialogVisible = addSheetOrDialogVisible === VOID ? this.c103_1 : addSheetOrDialogVisible;
    hasBulkImportPermission = hasBulkImportPermission === VOID ? this.d103_1 : hasBulkImportPermission;
    return $super === VOID ? this.k105(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) : $super.k105.call(this, personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission);
  };
  protoOf(PersonListUiState).toString = function () {
    return 'PersonListUiState(personList=' + this.u102_1 + ', sortOptions=' + this.v102_1 + ', sortOption=' + this.w102_1 + ', showAddItem=' + this.x102_1 + ', showInviteViaLink=' + this.y102_1 + ', showInviteViaContact=' + this.z102_1 + ', inviteCode=' + this.a103_1 + ', showSortOptions=' + this.b103_1 + ', addSheetOrDialogVisible=' + this.c103_1 + ', hasBulkImportPermission=' + this.d103_1 + ')';
  };
  protoOf(PersonListUiState).hashCode = function () {
    var result = hashCode(this.u102_1);
    result = imul(result, 31) + hashCode(this.v102_1) | 0;
    result = imul(result, 31) + this.w102_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.x102_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.y102_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.z102_1) | 0;
    result = imul(result, 31) + (this.a103_1 == null ? 0 : getStringHashCode(this.a103_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.b103_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.c103_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.d103_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.u102_1, tmp0_other_with_cast.u102_1))
      return false;
    if (!equals(this.v102_1, tmp0_other_with_cast.v102_1))
      return false;
    if (!this.w102_1.equals(tmp0_other_with_cast.w102_1))
      return false;
    if (!(this.x102_1 === tmp0_other_with_cast.x102_1))
      return false;
    if (!(this.y102_1 === tmp0_other_with_cast.y102_1))
      return false;
    if (!(this.z102_1 === tmp0_other_with_cast.z102_1))
      return false;
    if (!(this.a103_1 == tmp0_other_with_cast.a103_1))
      return false;
    if (!(this.b103_1 === tmp0_other_with_cast.b103_1))
      return false;
    if (!(this.c103_1 === tmp0_other_with_cast.c103_1))
      return false;
    if (!(this.d103_1 === tmp0_other_with_cast.d103_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.t105_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$slambda$slambda).v105 = function (it, $completion) {
    var tmp = this.w105(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ManageAccountViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.v105((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.t105_1.w106_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.h107(VOID, VOID, VOID, VOID, VOID, this.u105_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).w105 = function (it, completion) {
    var i = new ManageAccountViewModel$slambda$slambda(this.t105_1, completion);
    i.u105_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.v105(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ManageAccountViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.q107_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$slambda$slambda_1).s107 = function (it, $completion) {
    var tmp = this.t107(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.s107((!(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.q107_1.w106_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_showCreatePasskey = this.r107_1.c1();
              var tmp1_passkeyCount = this.r107_1.u();
              var nextValue = prevValue.h107(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).t107 = function (it, completion) {
    var i = new ManageAccountViewModel$slambda$slambda_1(this.q107_1, completion);
    i.r107_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.s107(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_apiUrlConfig__mldllg_5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.v106_1;
    apiUrlConfig$factory_12();
    return this_0.t2();
  }
  function _get_createPasskeyUseCase__ryoxza($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.x106_1;
    createPasskeyUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_190() {
    this.u107_1 = 'ManageAccount';
    this.v107_1 = 'PersonFullName';
    this.w107_1 = 'PersonUsername';
  }
  var Companion_instance_239;
  function Companion_getInstance_207() {
    return Companion_instance_239;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_37(function_0) {
    this.x107_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_37).t1d = function (value, $completion) {
    return this.x107_1(value, $completion);
  };
  function ManageAccountViewModel$slambda(this$0, resultContinuation) {
    this.g108_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.g108_1.cqq().bk4().a7f().zfz(this.g108_1.s106_1);
            var tmp_1 = ManageAccountViewModel$slambda$slambda_0(this.g108_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.g108_1, completion);
    i.h108_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.q108_1 = $di;
    this.r108_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.q108_1;
            var context = new LearningSpace(_get_apiUrlConfig__mldllg_5(this.r108_1).ho8_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.t108_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null).ak4();
            this.u108_1 = this.t108_1.b7g().zh0(this.r108_1.zqp().toc().cl0_1);
            this.hd_1 = 1;
            var tmp_5 = ManageAccountViewModel$slambda$slambda_2(this.r108_1, null);
            suspendResult = this.u108_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.q108_1, this.r108_1, completion);
    i.s108_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_126();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.s106_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.t106_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp_1 = this;
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('PersonUsername');
    tmp_1.u106_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.v106_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_11());
    this.w106_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.x106_1 = InstanceOrNull(this, tmp$ret$2, null).a5d(this, createPasskeyUseCase$factory());
    this.y106_1 = asStateFlow(this.w106_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).ho8_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.z106_1 = tmp_9.e58(tmp$ret$7, null);
    var tmp_11 = this.aqq();
    launch(tmp_11, VOID, VOID, ManageAccountViewModel$slambda_0(this, null));
    var tmp_12;
    if (savedStateHandle.ba('listMode') === ListViewMode_PICKER_getInstance().iqm_1) {
      tmp_12 = this.jqq().vol(strings_getInstance().anc_1);
    } else {
      tmp_12 = this.jqq().vol(strings_getInstance().emn_1);
    }
    var tmp0_title = tmp_12;
    this.nqp_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.w106_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.manageaccount.ManageAccountViewModel.<anonymous>' call
        var tmp0_personUsername = this.u106_1;
        var tmp1_personName = this.t106_1;
        var tmp2_passkeySupported = !(_get_createPasskeyUseCase__ryoxza(this) == null) ? this.zqp().toc().cl0_1.equals(this.s106_1) : false;
        var nextValue = prevValue.h107(VOID, VOID, tmp2_passkeySupported, tmp1_personName, tmp0_personUsername);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_13 = this.aqq();
    launch(tmp_13, VOID, VOID, ManageAccountViewModel$slambda_2(di, this, null));
  }
  protoOf(ManageAccountViewModel).v108 = function () {
    Companion_getInstance_126();
    this.lqp_1.wp8('AccountEdit', mapOf_0(to('entityUid', this.s106_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.a107_1 = passkeyCount;
    this.b107_1 = showCreatePasskey;
    this.c107_1 = passkeySupported;
    this.d107_1 = personName;
    this.e107_1 = personUsername;
    this.f107_1 = personAuth;
    this.g107_1 = errorText;
  }
  protoOf(ManageAccountUiState).w108 = function (passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, errorText) {
    return new ManageAccountUiState(passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, errorText);
  };
  protoOf(ManageAccountUiState).h107 = function (passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, errorText, $super) {
    passkeyCount = passkeyCount === VOID ? this.a107_1 : passkeyCount;
    showCreatePasskey = showCreatePasskey === VOID ? this.b107_1 : showCreatePasskey;
    passkeySupported = passkeySupported === VOID ? this.c107_1 : passkeySupported;
    personName = personName === VOID ? this.d107_1 : personName;
    personUsername = personUsername === VOID ? this.e107_1 : personUsername;
    personAuth = personAuth === VOID ? this.f107_1 : personAuth;
    errorText = errorText === VOID ? this.g107_1 : errorText;
    return $super === VOID ? this.w108(passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, errorText) : $super.w108.call(this, passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, errorText);
  };
  protoOf(ManageAccountUiState).toString = function () {
    return 'ManageAccountUiState(passkeyCount=' + this.a107_1 + ', showCreatePasskey=' + this.b107_1 + ', passkeySupported=' + this.c107_1 + ', personName=' + this.d107_1 + ', personUsername=' + this.e107_1 + ', personAuth=' + this.f107_1 + ', errorText=' + this.g107_1 + ')';
  };
  protoOf(ManageAccountUiState).hashCode = function () {
    var result = this.a107_1;
    result = imul(result, 31) + getBooleanHashCode(this.b107_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.c107_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.d107_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.e107_1) | 0;
    result = imul(result, 31) + (this.f107_1 == null ? 0 : hashCode(this.f107_1)) | 0;
    result = imul(result, 31) + (this.g107_1 == null ? 0 : getStringHashCode(this.g107_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.a107_1 === tmp0_other_with_cast.a107_1))
      return false;
    if (!(this.b107_1 === tmp0_other_with_cast.b107_1))
      return false;
    if (!(this.c107_1 === tmp0_other_with_cast.c107_1))
      return false;
    if (!(this.d107_1 === tmp0_other_with_cast.d107_1))
      return false;
    if (!(this.e107_1 === tmp0_other_with_cast.e107_1))
      return false;
    if (!equals(this.f107_1, tmp0_other_with_cast.f107_1))
      return false;
    if (!(this.g107_1 == tmp0_other_with_cast.g107_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_191() {
    this.x108_1 = 'RegisterAgeRedirect';
  }
  var Companion_instance_240;
  function Companion_getInstance_208() {
    return Companion_instance_240;
  }
  function RegisterAgeRedirectViewModel$onClickNext$ref($boundThis) {
    var l = function () {
      $boundThis.jwo();
      return Unit_instance;
    };
    l.callableName = 'onClickNext';
    return l;
  }
  function RegisterAgeRedirectViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'RegisterAgeRedirect');
    this.t109_1 = MutableStateFlow(new RegisterAgeRedirectUiState(VOID, systemTimeInMillis()));
    this.u109_1 = asStateFlow(this.t109_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.<anonymous>' call
        var tmp0_title = this.jqq().vol(strings_getInstance().fnr_1);
        var tmp = this.jqq().vol(strings_getInstance().cml_1);
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp, VOID, RegisterAgeRedirectViewModel$onClickNext$ref(this));
        var nextValue = prevValue.vq8(VOID, VOID, tmp0_title, false, VOID, VOID, false, VOID, tmp1_actionBarButtonState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(RegisterAgeRedirectViewModel).v109 = function (date) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.t109_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onSetDate.<anonymous>' call
        var nextValue = prevValue.z109(date, VOID, !prevValue.w109_1.equals(date) ? null : prevValue.y109_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(RegisterAgeRedirectViewModel).jwo = function () {
    var date = this.t109_1.t2().w109_1;
    if (date.equals(new Long(0, 0))) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.t109_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
          var nextValue = prevValue.z109(VOID, VOID, this.jqq().vol(strings_getInstance().cmp_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.t109_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.z109(VOID, VOID, this.jqq().vol(strings_getInstance().rmr_1));
          if (this_2.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      return Unit_instance;
    }
    var dateOfBirthInstant = Companion_getInstance_6().mmi(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.xqq(this_3, Companion_getInstance_215().vr9_1);
    Companion_getInstance_126();
    this.wqq(this_3, 'next');
    this_3.s('showAccept', 'true');
    Companion_getInstance_215();
    this_3.s('isMinor', isMinor.toString());
    Companion_getInstance_204();
    this_3.s('DateOfBirth', date.toString());
    var args = this_3.f3();
    if (isMinor) {
      Companion_getInstance_215();
      this.lqp_1.wp8('SignUp', args);
    } else {
      this.lqp_1.wp8('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.w109_1 = dateOfBirth;
    this.x109_1 = maxDate;
    this.y109_1 = dateOfBirthError;
  }
  protoOf(RegisterAgeRedirectUiState).a10a = function (dateOfBirth, maxDate, dateOfBirthError) {
    return new RegisterAgeRedirectUiState(dateOfBirth, maxDate, dateOfBirthError);
  };
  protoOf(RegisterAgeRedirectUiState).z109 = function (dateOfBirth, maxDate, dateOfBirthError, $super) {
    dateOfBirth = dateOfBirth === VOID ? this.w109_1 : dateOfBirth;
    maxDate = maxDate === VOID ? this.x109_1 : maxDate;
    dateOfBirthError = dateOfBirthError === VOID ? this.y109_1 : dateOfBirthError;
    return $super === VOID ? this.a10a(dateOfBirth, maxDate, dateOfBirthError) : $super.a10a.call(this, dateOfBirth, maxDate, dateOfBirthError);
  };
  protoOf(RegisterAgeRedirectUiState).toString = function () {
    return 'RegisterAgeRedirectUiState(dateOfBirth=' + this.w109_1.toString() + ', maxDate=' + this.x109_1.toString() + ', dateOfBirthError=' + this.y109_1 + ')';
  };
  protoOf(RegisterAgeRedirectUiState).hashCode = function () {
    var result = this.w109_1.hashCode();
    result = imul(result, 31) + this.x109_1.hashCode() | 0;
    result = imul(result, 31) + (this.y109_1 == null ? 0 : getStringHashCode(this.y109_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.w109_1.equals(tmp0_other_with_cast.w109_1))
      return false;
    if (!this.x109_1.equals(tmp0_other_with_cast.x109_1))
      return false;
    if (!(this.y109_1 == tmp0_other_with_cast.y109_1))
      return false;
    return true;
  };
  function Companion_192() {
    this.b10a_1 = 'WaitForParent';
    this.c10a_1 = 'username';
    this.d10a_1 = 'password';
    this.e10a_1 = 'parentContact';
    this.f10a_1 = 'showUsernamePassword';
    this.g10a_1 = 'RefererScreen';
  }
  var Companion_instance_241;
  function Companion_getInstance_209() {
    return Companion_instance_241;
  }
  function RegisterMinorWaitForParentViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'WaitForParent');
    this.c10b_1 = MutableStateFlow(new RegisterMinorWaitForParentUiState());
    this.d10b_1 = asStateFlow(this.c10b_1);
    this.e10b_1 = savedStateHandle.ba('RefererScreen');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.c10b_1;
      while (true) {
        var prevValue = this_0.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 = prevValue.j10b(tmp, tmp_0, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs, toBoolean(savedStateHandle.ba('showUsernamePassword')));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nqp_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerminorwaitforparent.RegisterMinorWaitForParentViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.vq8(VOID, VOID, this.c10b_1.t2().i10b_1 ? this.jqq().vol(strings_getInstance().uml_1) : this.jqq().vol(strings_getInstance().unt_1), false, VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(RegisterMinorWaitForParentViewModel).k10b = function () {
    if (!(this.e10b_1 == null)) {
      this.lqp_1.uqb(this.e10b_1, emptyMap(), new UstadGoOptions(VOID, VOID, true));
      return Unit_instance;
    }
    this.lqp_1.vqb('WaitForParent', true);
  };
  function RegisterMinorWaitForParentUiState(username, password, parentContact, showUsernameAndPassword) {
    username = username === VOID ? '' : username;
    password = password === VOID ? '' : password;
    parentContact = parentContact === VOID ? '' : parentContact;
    showUsernameAndPassword = showUsernameAndPassword === VOID ? true : showUsernameAndPassword;
    this.f10b_1 = username;
    this.g10b_1 = password;
    this.h10b_1 = parentContact;
    this.i10b_1 = showUsernameAndPassword;
  }
  protoOf(RegisterMinorWaitForParentUiState).j10b = function (username, password, parentContact, showUsernameAndPassword) {
    return new RegisterMinorWaitForParentUiState(username, password, parentContact, showUsernameAndPassword);
  };
  protoOf(RegisterMinorWaitForParentUiState).toString = function () {
    return 'RegisterMinorWaitForParentUiState(username=' + this.f10b_1 + ', password=' + this.g10b_1 + ', parentContact=' + this.h10b_1 + ', showUsernameAndPassword=' + this.i10b_1 + ')';
  };
  protoOf(RegisterMinorWaitForParentUiState).hashCode = function () {
    var result = getStringHashCode(this.f10b_1);
    result = imul(result, 31) + getStringHashCode(this.g10b_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.h10b_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.i10b_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.f10b_1 === tmp0_other_with_cast.f10b_1))
      return false;
    if (!(this.g10b_1 === tmp0_other_with_cast.g10b_1))
      return false;
    if (!(this.h10b_1 === tmp0_other_with_cast.h10b_1))
      return false;
    if (!(this.i10b_1 === tmp0_other_with_cast.i10b_1))
      return false;
    return true;
  };
  function toFirstAndLastNameExt(_this__u8e3s4) {
    var tmp;
    if (_this__u8e3s4 == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp = toString(trim(isCharSequence(_this__u8e3s4) ? _this__u8e3s4 : THROW_CCE()));
    }
    var tmp1_safe_receiver = tmp;
    var tmp_0;
    if (tmp1_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.text.split' call
      tmp_0 = Regex_init_$Create$('[ .]').y9(tmp1_safe_receiver, 2);
    }
    var parts = tmp_0;
    // Inline function 'kotlin.text.orEmpty' call
    var tmp0_elvis_lhs = parts == null ? null : getOrNull(parts, 0);
    var firstName = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    // Inline function 'kotlin.text.orEmpty' call
    var tmp0_elvis_lhs_0 = parts == null ? null : getOrNull(parts, 1);
    var lastName = tmp0_elvis_lhs_0 == null ? '' : tmp0_elvis_lhs_0;
    return to(firstName, lastName);
  }
  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.i10c_1;
    apiUrlConfig$factory_14();
    return this_0.t2();
  }
  function Companion_193() {
    this.j10c_1 = '';
  }
  var Companion_instance_242;
  function Companion_getInstance_210() {
    return Companion_instance_242;
  }
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1(function_0) {
    this.k10c_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1).epl = function (url, target) {
    return this.k10c_1(url, target);
  };
  function RedirectViewModel$slambda(this$0, $destinationArg, $destination, $di, resultContinuation) {
    this.t10c_1 = this$0;
    this.u10c_1 = $destinationArg;
    this.v10c_1 = $destination;
    this.w10c_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.t10c_1.lqp_1;
          var tmp1_accountManager = this.t10c_1.zqp();
          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.t10c_1).ko8_1;
          var tmp4_goOptions = new UstadGoOptions(VOID, VOID, true);
          var tmp5_forceAccountSelection = !(this.u10c_1 == null);
          var tmp6_presetLearningSpaceUrl = _get_apiUrlConfig__mldllg_6(this.t10c_1).io8_1;
          navigateToLink(tmp0_$receiver, this.v10c_1, tmp1_accountManager, tmp2_openExternalLinkUseCase, tmp4_goOptions, tmp5_forceAccountSelection, tmp3_userCanSelectServer, VOID, VOID, VOID, VOID, tmp6_presetLearningSpaceUrl, RedirectViewModel$slambda$lambda_0(this.w10c_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.t10c_1, this.u10c_1, this.v10c_1, this.w10c_1, completion);
    i.x10c_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_117();
    tmp.g10c_1 = savedStateHandle.ba('next');
    var tmp_0 = this;
    Companion_getInstance_117();
    tmp_0.h10c_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.i10c_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_13());
    this.nqp_1.x1k(new AppUiState(VOID, VOID, VOID, false, VOID, VOID, VOID, VOID, VOID, VOID, true));
    var tmp0_elvis_lhs = this.h10c_1;
    var destinationArg = tmp0_elvis_lhs == null ? this.g10c_1 : tmp0_elvis_lhs;
    var activeLearningSpace = this.zqp().voc();
    if (!contains(activeLearningSpace.xnv_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.zqp().eoc().anx_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).cph();
    } else {
      tmp_8 = destinationArg;
    }
    var destination = tmp_8;
    var tmp_13 = this.aqq();
    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).h10d = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.h10d(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).jo1 = function (it, completion) {
    var i = new ScheduleEditViewModel$slambda$slambda(completion);
    i.g10d_1 = it;
    return i;
  };
  function ScheduleEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ScheduleEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.h10d(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.q10d_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda$slambda_1).t10d = 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.t10d($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.r10d_1 = new Schedule();
            var tmp_1 = this;
            tmp_1.s10d_1 = this.r10d_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.q10d_1.dqq());
            suspendResult = tmp_2.o62(21, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.s10d_1.zhf_1 = ARGUMENT;
            this.s10d_1.lhg_1 = true;
            this.s10d_1.ehg_1 = Companion_instance_29.ekx_1;
            return this.r10d_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.q10d_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.t10d($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.r10e_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.x10e(schedule);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_194() {
    this.y10e_1 = 'ScheduleEdit';
  }
  var Companion_instance_243;
  function Companion_getInstance_211() {
    return Companion_instance_243;
  }
  function ScheduleEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ScheduleEditViewModel$slambda(this$0, resultContinuation) {
    this.h10f_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.j10f_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.h10f_1, null);
            suspendResult = this.h10f_1.tqq(this.j10f_1, VOID, VOID, tmp_0, tmp_1, ScheduleEditViewModel$slambda$lambda(this.h10f_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.h10f_1.r10e_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.x10e(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.h10f_1, completion);
    i.i10f_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.s10f_1 = $commitDelay;
    this.t10f_1 = $entity;
    this.u10f_1 = $this;
    this.v10f_1 = $key;
    this.w10f_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.s10f_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.t10f_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.u10f_1.pqq(this.u10f_1.jqp_1, this.v10f_1, this.w10f_1, this.t10f_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.s10f_1, this.t10f_1, this.u10f_1, this.v10f_1, this.w10f_1, completion);
    i.x10f_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.r10e_1 = MutableStateFlow(new ScheduleEditUiState(VOID, VOID, VOID, false));
    this.s10e_1 = asStateFlow(this.r10e_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.<anonymous>' call
        var tmp0_title = this.tqw(strings_getInstance().imw_1, strings_getInstance().jmw_1);
        var tmp = this.jqq().vol(strings_getInstance().amt_1);
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp, VOID, ScheduleEditViewModel$onClickSave$ref(this));
        var nextValue = prevValue.vq8(VOID, VOID, tmp0_title, VOID, true, VOID, VOID, VOID, tmp1_actionBarButtonState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.aqq();
    launch(tmp_0, VOID, VOID, ScheduleEditViewModel$slambda_0(this, null));
  }
  protoOf(ScheduleEditViewModel).y10f = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.r10e_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.t10e_1;
        var tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.ahg_1;
        var tmp4_toTimeError = this.uqw(tmp, entity == null ? null : entity.ahg_1, prevValue.v10e_1);
        var tmp0_safe_receiver = prevValue.t10e_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bhg_1;
        var tmp5_fromTimeError = this.uqw(tmp_0, entity == null ? null : entity.bhg_1, prevValue.u10e_1);
        var nextValue = prevValue.x10e(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_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_1 = this;
    var tmp_2 = this.aqq();
    tmp_1.qqv_1 = launch(tmp_2, VOID, VOID, ScheduleEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ScheduleEditViewModel).vsd = function () {
    var tmp0_elvis_lhs = this.r10e_1.t2().t10e_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.r10e_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.ahg_1.equals(new Long(0, 0))) {
          tmp_0 = this.jqq().vol(strings_getInstance().cmp_1);
        } else {
          tmp_0 = null;
        }
        var tmp_1 = tmp_0;
        var tmp_2;
        if (schedule.bhg_1.equals(new Long(0, 0))) {
          tmp_2 = this.jqq().vol(strings_getInstance().cmp_1);
        } else if (schedule.bhg_1.c7(schedule.ahg_1) <= 0) {
          tmp_2 = this.jqq().vol(strings_getInstance().zna_1);
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.x10e(VOID, tmp_1, tmp_2);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (this.r10e_1.t2().u10e_1 == null ? this.r10e_1.t2().v10e_1 == null : false) {
      this.uqv(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.t10e_1 = entity;
    this.u10e_1 = fromTimeError;
    this.v10e_1 = toTimeError;
    this.w10e_1 = fieldsEnabled;
  }
  protoOf(ScheduleEditUiState).z10f = function (entity, fromTimeError, toTimeError, fieldsEnabled) {
    return new ScheduleEditUiState(entity, fromTimeError, toTimeError, fieldsEnabled);
  };
  protoOf(ScheduleEditUiState).x10e = function (entity, fromTimeError, toTimeError, fieldsEnabled, $super) {
    entity = entity === VOID ? this.t10e_1 : entity;
    fromTimeError = fromTimeError === VOID ? this.u10e_1 : fromTimeError;
    toTimeError = toTimeError === VOID ? this.v10e_1 : toTimeError;
    fieldsEnabled = fieldsEnabled === VOID ? this.w10e_1 : fieldsEnabled;
    return $super === VOID ? this.z10f(entity, fromTimeError, toTimeError, fieldsEnabled) : $super.z10f.call(this, entity, fromTimeError, toTimeError, fieldsEnabled);
  };
  protoOf(ScheduleEditUiState).toString = function () {
    return 'ScheduleEditUiState(entity=' + this.t10e_1 + ', fromTimeError=' + this.u10e_1 + ', toTimeError=' + this.v10e_1 + ', fieldsEnabled=' + this.w10e_1 + ')';
  };
  protoOf(ScheduleEditUiState).hashCode = function () {
    var result = this.t10e_1 == null ? 0 : this.t10e_1.hashCode();
    result = imul(result, 31) + (this.u10e_1 == null ? 0 : getStringHashCode(this.u10e_1)) | 0;
    result = imul(result, 31) + (this.v10e_1 == null ? 0 : getStringHashCode(this.v10e_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.w10e_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.t10e_1, tmp0_other_with_cast.t10e_1))
      return false;
    if (!(this.u10e_1 == tmp0_other_with_cast.u10e_1))
      return false;
    if (!(this.v10e_1 == tmp0_other_with_cast.v10e_1))
      return false;
    if (!(this.w10e_1 === tmp0_other_with_cast.w10e_1))
      return false;
    return true;
  };
  function Companion_195() {
    this.a10g_1 = 'DevSettings';
    this.b10g_1 = 'showDevSettings';
  }
  var Companion_instance_244;
  function Companion_getInstance_212() {
    return Companion_instance_244;
  }
  function SettingsViewModel$slambda$slambda(this$0, resultContinuation) {
    this.k10g_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SettingsViewModel$slambda$slambda).uqh = function (siteAdminSettingsVisible, $completion) {
    var tmp = this.vqh(siteAdminSettingsVisible, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SettingsViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.uqh((!(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.k10g_1.h10h_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.s10i(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.l10g_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).vqh = function (siteAdminSettingsVisible, completion) {
    var i = new SettingsViewModel$slambda$slambda(this.k10g_1, completion);
    i.l10g_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.uqh(siteAdminSettingsVisible, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_supportedLangConfig__llzj1v($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.j10h_1;
    supportedLangConfig$factory_0();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.k10h_1;
    setLanguageUseCase$factory_4();
    return this_0.t2();
  }
  function _get_getHtmlContentDisplayOptsUseCase__lppxoi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.m10h_1;
    getHtmlContentDisplayOptsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getHtmlContentDisplaySettingUseCase__usawf4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.n10h_1;
    getHtmlContentDisplaySettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setHtmlContentDisplaySettingUseCase__8cgzqk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.o10h_1;
    setHtmlContentDisplaySettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.p10h_1;
    getVersionUseCase$factory_4();
    return this_0.t2();
  }
  function _get_getStorageOptionsUseCase__v5dedp($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.q10h_1;
    getStorageOptionsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getOfflineStorageSettingUseCase__5c8mhw($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.r10h_1;
    getOfflineStorageSettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setOfflineStorageSettingUseCase__lx9or4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.s10h_1;
    setOfflineStorageSettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getOfflineStorageAvailableSpace__om40zq($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.t10h_1;
    getOfflineStorageAvailableSpace$factory_0();
    return this_0.t2();
  }
  function _get_settings__lbkut4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.v10h_1;
    settings$factory_0();
    return this_0.t2();
  }
  function _get_zipFileUseCase__jhxb01($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.w10h_1;
    zipFileUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_196() {
    this.t10i_1 = 'Settings';
  }
  var Companion_instance_245;
  function Companion_getInstance_213() {
    return Companion_instance_245;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_38(function_0) {
    this.u10i_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_38).t1d = function (value, $completion) {
    return this.u10i_1(value, $completion);
  };
  function SettingsViewModel$slambda(this$0, resultContinuation) {
    this.d10j_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 = 6;
            var tmp_0 = this;
            var tmp0_safe_receiver = _get_getStorageOptionsUseCase__v5dedp(this.d10j_1);
            tmp_0.f10j_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cph();
            var tmp_1 = this;
            var tmp1_safe_receiver = _get_getOfflineStorageSettingUseCase__5c8mhw(this.d10j_1);
            tmp_1.g10j_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.cph();
            if (!(this.f10j_1 == null)) {
              var tmp_2 = this;
              tmp_2.h10j_1 = this.f10j_1;
              var tmp_3 = this;
              tmp_3.i10j_1 = this.h10j_1;
              var tmp_4 = this;
              tmp_4.j10j_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.h10j_1, 10));
              this.k10j_1 = this.i10j_1.w();
              this.hd_1 = 1;
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

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

            this.l10j_1 = this.k10j_1.e();
            var tmp_5 = this;
            tmp_5.m10j_1 = this.l10j_1;
            this.n10j_1 = _get_getOfflineStorageAvailableSpace__om40zq(this.d10j_1);
            if (this.n10j_1 == null) {
              this.o10j_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = this.n10j_1.bpp(this.m10j_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.o10j_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            var tmp1_elvis_lhs = this.o10j_1;
            var ARGUMENT = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var ARGUMENT_0 = new SettingsOfflineStorageOption(this.m10j_1, ARGUMENT);
            this.j10j_1.i1(ARGUMENT_0);
            this.hd_1 = 1;
            continue $sm;
          case 4:
            var optionsWithSpace = this.j10j_1;
            l$ret$1: do {
              var this_0 = this.d10j_1.h10h_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp0_elvis_lhs = this.g10j_1;
                var nextValue = prevValue.s10i(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, optionsWithSpace, tmp0_elvis_lhs == null ? first_0(this.f10j_1) : tmp0_elvis_lhs);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            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(SettingsViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SettingsViewModel$slambda(this.d10j_1, completion);
    i.e10j_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$slambda_1(this$0, resultContinuation) {
    this.x10j_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SettingsViewModel$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(SettingsViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SettingsViewModel$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.x10j_1.fqq().p7f();
            var tmp_1 = this.x10j_1.bqq();
            PermissionFlags_getInstance();
            var tmp_2 = tmp_0.zi1(tmp_1, new Long(16384, 0));
            var tmp_3 = SettingsViewModel$slambda$slambda_0(this.x10j_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_1).v1m = function ($this$launch, completion) {
    var i = new SettingsViewModel$slambda_1(this.x10j_1, completion);
    i.y10j_1 = $this$launch;
    return i;
  };
  function SettingsViewModel$slambda_2(this$0, resultContinuation) {
    var i = new SettingsViewModel$slambda_1(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.h10h_1 = MutableStateFlow(new SettingsUiState());
    this.i10h_1 = asStateFlow(this.h10h_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.j10h_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.k10h_1 = Instance(this, tmp$ret$2, null).a5d(this, setLanguageUseCase$factory_3());
    this.l10h_1 = _get_supportedLangConfig__llzj1v(this).jqa(this.jqq());
    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.m10h_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.n10h_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.o10h_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.p10h_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(GetOfflineStorageOptionsUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.q10h_1 = InstanceOrNull(this, tmp$ret$12, null).a5d(this, getStorageOptionsUseCase$factory());
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(GetOfflineStorageSettingUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_13.r10h_1 = InstanceOrNull(this, tmp$ret$14, null).a5d(this, getOfflineStorageSettingUseCase$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(SetOfflineStorageSettingUseCase), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.s10h_1 = InstanceOrNull(this, tmp$ret$16, null).a5d(this, setOfflineStorageSettingUseCase$factory());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(GetOfflineStorageAvailableSpace), arrayOf([]), false));
    var tmp$ret$18 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.t10h_1 = InstanceOrNull(this, tmp$ret$18, null).a5d(this, getOfflineStorageAvailableSpace$factory());
    this.u10h_1 = atomic$int$1(0);
    var tmp_19 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_20 = typeToken(createKType(getKClass(Settings), arrayOf([]), false));
    var tmp$ret$20 = isInterface(tmp_20, TypeToken) ? tmp_20 : THROW_CCE();
    tmp_19.v10h_1 = Instance(this, tmp$ret$20, null).a5d(this, settings$factory());
    var tmp_21 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_22 = typeToken(createKType(getKClass(ZipFileUseCase), arrayOf([]), false));
    var tmp$ret$22 = isInterface(tmp_22, TypeToken) ? tmp_22 : THROW_CCE();
    tmp_21.w10h_1 = Instance(this, tmp$ret$22, null).a5d(this, zipFileUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, this.jqq().vol(strings_getInstance().cmm_1), VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_elvis_lhs = _get_supportedLangConfig__llzj1v(this).bqa();
    var tmp_23;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_97();
      tmp_23 = '';
    } else {
      tmp_23 = tmp0_elvis_lhs;
    }
    var langSetting = tmp_23;
    var tmp$ret$27;
    $l$block_0: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = this.l10h_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        if (element.qq6_1 === langSetting) {
          tmp$ret$27 = element;
          break $l$block_0;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    var currentLang = tmp$ret$27;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.h10h_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        var tmp3_currentLanguage = currentLang.rq6_1;
        var tmp4_availableLanguages = this.l10h_1;
        var tmp0_safe_receiver = _get_getHtmlContentDisplayOptsUseCase__lppxoi(this);
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cph();
        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.cph();
        var tmp7_version = _get_getVersionUseCase__n7x57g_1(this).cph().aph_1;
        var tmp_24 = _get_settings__lbkut4(this);
        var tmp8_showDeveloperOptions = tmp_24.hm9('showDevSettings', false);
        var nextValue_0 = prevValue_0.s10i(VOID, VOID, VOID, VOID, VOID, VOID, tmp5_htmlContentDisplayOptions, tmp6_currentHtmlContentDisplayOption, VOID, VOID, VOID, VOID, VOID, tmp3_currentLanguage, tmp4_availableLanguages, VOID, tmp8_showDeveloperOptions, tmp7_version);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_1;
        }
      }
    }
    var tmp_25 = this.aqq();
    launch(tmp_25, VOID, VOID, SettingsViewModel$slambda_0(this, null));
    var tmp_26 = this.aqq();
    launch(tmp_26, VOID, VOID, SettingsViewModel$slambda_2(this, null));
  }
  protoOf(SettingsViewModel).z10j = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.h10h_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLanguage.<anonymous>' call
        var nextValue = prevValue.s10i(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SettingsViewModel).a10k = function (lang) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.h10h_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLang.<anonymous>' call
        var nextValue = prevValue.s10i(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).spk(lang, 'Settings', this.lqp_1);
    if (result.qpk_1) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.h10h_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.s10i(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.h10h_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.s10i(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, lang.rq6_1);
          if (this_2.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
  };
  protoOf(SettingsViewModel).oze = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.h10h_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onDismissLangDialog.<anonymous>' call
        var nextValue = prevValue.s10i(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SettingsViewModel).b10k = function () {
    this.lqp_1.wp8('Community', emptyMap());
  };
  protoOf(SettingsViewModel).c10k = function () {
    this.lqp_1.wp8('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) {
    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;
    this.x10h_1 = sendAppOptionVisible;
    this.y10h_1 = selectedBackupFolderUri;
    this.z10h_1 = selectedBackupFolderName;
    this.a10i_1 = isCreatingBackup;
    this.b10i_1 = backupProgress;
    this.c10i_1 = selectedBackupPath;
    this.d10i_1 = htmlContentDisplayOptions;
    this.e10i_1 = currentHtmlContentDisplayOption;
    this.f10i_1 = holidayCalendarVisible;
    this.g10i_1 = workspaceSettingsVisible;
    this.h10i_1 = reasonLeavingVisible;
    this.i10i_1 = langDialogVisible;
    this.j10i_1 = htmlContentDisplayDialogVisible;
    this.k10i_1 = currentLanguage;
    this.l10i_1 = availableLanguages;
    this.m10i_1 = waitForRestartDialogVisible;
    this.n10i_1 = showDeveloperOptions;
    this.o10i_1 = version;
    this.p10i_1 = storageOptions;
    this.q10i_1 = selectedOfflineStorageOption;
    this.r10i_1 = storageOptionsDialogVisible;
  }
  protoOf(SettingsUiState).d10k = function (sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible) {
    return new SettingsUiState(sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible);
  };
  protoOf(SettingsUiState).s10i = function (sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible, $super) {
    sendAppOptionVisible = sendAppOptionVisible === VOID ? this.x10h_1 : sendAppOptionVisible;
    selectedBackupFolderUri = selectedBackupFolderUri === VOID ? this.y10h_1 : selectedBackupFolderUri;
    selectedBackupFolderName = selectedBackupFolderName === VOID ? this.z10h_1 : selectedBackupFolderName;
    isCreatingBackup = isCreatingBackup === VOID ? this.a10i_1 : isCreatingBackup;
    backupProgress = backupProgress === VOID ? this.b10i_1 : backupProgress;
    selectedBackupPath = selectedBackupPath === VOID ? this.c10i_1 : selectedBackupPath;
    htmlContentDisplayOptions = htmlContentDisplayOptions === VOID ? this.d10i_1 : htmlContentDisplayOptions;
    currentHtmlContentDisplayOption = currentHtmlContentDisplayOption === VOID ? this.e10i_1 : currentHtmlContentDisplayOption;
    holidayCalendarVisible = holidayCalendarVisible === VOID ? this.f10i_1 : holidayCalendarVisible;
    workspaceSettingsVisible = workspaceSettingsVisible === VOID ? this.g10i_1 : workspaceSettingsVisible;
    reasonLeavingVisible = reasonLeavingVisible === VOID ? this.h10i_1 : reasonLeavingVisible;
    langDialogVisible = langDialogVisible === VOID ? this.i10i_1 : langDialogVisible;
    htmlContentDisplayDialogVisible = htmlContentDisplayDialogVisible === VOID ? this.j10i_1 : htmlContentDisplayDialogVisible;
    currentLanguage = currentLanguage === VOID ? this.k10i_1 : currentLanguage;
    availableLanguages = availableLanguages === VOID ? this.l10i_1 : availableLanguages;
    waitForRestartDialogVisible = waitForRestartDialogVisible === VOID ? this.m10i_1 : waitForRestartDialogVisible;
    showDeveloperOptions = showDeveloperOptions === VOID ? this.n10i_1 : showDeveloperOptions;
    version = version === VOID ? this.o10i_1 : version;
    storageOptions = storageOptions === VOID ? this.p10i_1 : storageOptions;
    selectedOfflineStorageOption = selectedOfflineStorageOption === VOID ? this.q10i_1 : selectedOfflineStorageOption;
    storageOptionsDialogVisible = storageOptionsDialogVisible === VOID ? this.r10i_1 : storageOptionsDialogVisible;
    return $super === VOID ? this.d10k(sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible) : $super.d10k.call(this, sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible);
  };
  protoOf(SettingsUiState).toString = function () {
    return 'SettingsUiState(sendAppOptionVisible=' + this.x10h_1 + ', selectedBackupFolderUri=' + this.y10h_1 + ', selectedBackupFolderName=' + this.z10h_1 + ', isCreatingBackup=' + this.a10i_1 + ', backupProgress=' + this.b10i_1 + ', selectedBackupPath=' + this.c10i_1 + ', htmlContentDisplayOptions=' + this.d10i_1 + ', currentHtmlContentDisplayOption=' + this.e10i_1 + ', holidayCalendarVisible=' + this.f10i_1 + ', workspaceSettingsVisible=' + this.g10i_1 + ', reasonLeavingVisible=' + this.h10i_1 + ', langDialogVisible=' + this.i10i_1 + ', htmlContentDisplayDialogVisible=' + this.j10i_1 + ', currentLanguage=' + this.k10i_1 + ', availableLanguages=' + this.l10i_1 + ', waitForRestartDialogVisible=' + this.m10i_1 + ', showDeveloperOptions=' + this.n10i_1 + ', version=' + this.o10i_1 + ', storageOptions=' + this.p10i_1 + ', selectedOfflineStorageOption=' + this.q10i_1 + ', storageOptionsDialogVisible=' + this.r10i_1 + ')';
  };
  protoOf(SettingsUiState).hashCode = function () {
    var result = getBooleanHashCode(this.x10h_1);
    result = imul(result, 31) + (this.y10h_1 == null ? 0 : getStringHashCode(this.y10h_1)) | 0;
    result = imul(result, 31) + (this.z10h_1 == null ? 0 : getStringHashCode(this.z10h_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.a10i_1) | 0;
    result = imul(result, 31) + getNumberHashCode(this.b10i_1) | 0;
    result = imul(result, 31) + (this.c10i_1 == null ? 0 : getStringHashCode(this.c10i_1)) | 0;
    result = imul(result, 31) + hashCode(this.d10i_1) | 0;
    result = imul(result, 31) + (this.e10i_1 == null ? 0 : this.e10i_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.f10i_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.g10i_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.h10i_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.i10i_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.j10i_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.k10i_1) | 0;
    result = imul(result, 31) + hashCode(this.l10i_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.m10i_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.n10i_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.o10i_1) | 0;
    result = imul(result, 31) + hashCode(this.p10i_1) | 0;
    result = imul(result, 31) + (this.q10i_1 == null ? 0 : this.q10i_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.r10i_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.x10h_1 === tmp0_other_with_cast.x10h_1))
      return false;
    if (!(this.y10h_1 == tmp0_other_with_cast.y10h_1))
      return false;
    if (!(this.z10h_1 == tmp0_other_with_cast.z10h_1))
      return false;
    if (!(this.a10i_1 === tmp0_other_with_cast.a10i_1))
      return false;
    if (!equals(this.b10i_1, tmp0_other_with_cast.b10i_1))
      return false;
    if (!(this.c10i_1 == tmp0_other_with_cast.c10i_1))
      return false;
    if (!equals(this.d10i_1, tmp0_other_with_cast.d10i_1))
      return false;
    if (!equals(this.e10i_1, tmp0_other_with_cast.e10i_1))
      return false;
    if (!(this.f10i_1 === tmp0_other_with_cast.f10i_1))
      return false;
    if (!(this.g10i_1 === tmp0_other_with_cast.g10i_1))
      return false;
    if (!(this.h10i_1 === tmp0_other_with_cast.h10i_1))
      return false;
    if (!(this.i10i_1 === tmp0_other_with_cast.i10i_1))
      return false;
    if (!(this.j10i_1 === tmp0_other_with_cast.j10i_1))
      return false;
    if (!(this.k10i_1 === tmp0_other_with_cast.k10i_1))
      return false;
    if (!equals(this.l10i_1, tmp0_other_with_cast.l10i_1))
      return false;
    if (!(this.m10i_1 === tmp0_other_with_cast.m10i_1))
      return false;
    if (!(this.n10i_1 === tmp0_other_with_cast.n10i_1))
      return false;
    if (!(this.o10i_1 === tmp0_other_with_cast.o10i_1))
      return false;
    if (!equals(this.p10i_1, tmp0_other_with_cast.p10i_1))
      return false;
    if (!equals(this.q10i_1, tmp0_other_with_cast.q10i_1))
      return false;
    if (!(this.r10i_1 === tmp0_other_with_cast.r10i_1))
      return false;
    return true;
  };
  function SettingsOfflineStorageOption(option, availableSpace) {
    this.e10k_1 = option;
    this.f10k_1 = availableSpace;
  }
  protoOf(SettingsOfflineStorageOption).toString = function () {
    return 'SettingsOfflineStorageOption(option=' + this.e10k_1 + ', availableSpace=' + this.f10k_1.toString() + ')';
  };
  protoOf(SettingsOfflineStorageOption).hashCode = function () {
    var result = this.e10k_1.hashCode();
    result = imul(result, 31) + this.f10k_1.hashCode() | 0;
    return result;
  };
  protoOf(SettingsOfflineStorageOption).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SettingsOfflineStorageOption))
      return false;
    var tmp0_other_with_cast = other instanceof SettingsOfflineStorageOption ? other : THROW_CCE();
    if (!this.e10k_1.equals(tmp0_other_with_cast.e10k_1))
      return false;
    if (!this.f10k_1.equals(tmp0_other_with_cast.f10k_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 getStorageOptionsUseCase$factory() {
    return getPropertyCallableRef('getStorageOptionsUseCase', 1, KProperty1, function (receiver) {
      return _get_getStorageOptionsUseCase__v5dedp(receiver);
    }, null);
  }
  function getOfflineStorageSettingUseCase$factory() {
    return getPropertyCallableRef('getOfflineStorageSettingUseCase', 1, KProperty1, function (receiver) {
      return _get_getOfflineStorageSettingUseCase__5c8mhw(receiver);
    }, null);
  }
  function setOfflineStorageSettingUseCase$factory() {
    return getPropertyCallableRef('setOfflineStorageSettingUseCase', 1, KProperty1, function (receiver) {
      return _get_setOfflineStorageSettingUseCase__lx9or4(receiver);
    }, null);
  }
  function getOfflineStorageAvailableSpace$factory() {
    return getPropertyCallableRef('getOfflineStorageAvailableSpace', 1, KProperty1, function (receiver) {
      return _get_getOfflineStorageAvailableSpace__om40zq(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 getStorageOptionsUseCase$factory_0() {
    return getPropertyCallableRef('getStorageOptionsUseCase', 1, KProperty1, function (receiver) {
      return _get_getStorageOptionsUseCase__v5dedp(receiver);
    }, null);
  }
  function getOfflineStorageSettingUseCase$factory_0() {
    return getPropertyCallableRef('getOfflineStorageSettingUseCase', 1, KProperty1, function (receiver) {
      return _get_getOfflineStorageSettingUseCase__5c8mhw(receiver);
    }, null);
  }
  function setOfflineStorageSettingUseCase$factory_0() {
    return getPropertyCallableRef('setOfflineStorageSettingUseCase', 1, KProperty1, function (receiver) {
      return _get_setOfflineStorageSettingUseCase__lx9or4(receiver);
    }, null);
  }
  function getOfflineStorageAvailableSpace$factory_0() {
    return getPropertyCallableRef('getOfflineStorageAvailableSpace', 1, KProperty1, function (receiver) {
      return _get_getOfflineStorageAvailableSpace__om40zq(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_197() {
    this.g10k_1 = 'otheroption';
    this.h10k_1 = 'otheroptionperson';
    this.i10k_1 = 'otheroptionpersonprofilepic';
    this.j10k_1 = 'isparent';
  }
  var Companion_instance_246;
  function Companion_getInstance_214() {
    return Companion_instance_246;
  }
  function SignUpViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda).azf = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.azf(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).jo1 = function (it, completion) {
    var i = new SignUpViewModel$slambda$slambda(completion);
    i.s10k_1 = it;
    return i;
  };
  function SignUpViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.azf(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda_1).kzf = 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.kzf($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.kzf($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.y10l_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.hks();
          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.m10n(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).xzs = function (it, $completion) {
    var tmp = this.jo1(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.xzs(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).jo1 = function (it, completion) {
    var i = new SignUpViewModel$slambda$slambda_3(completion);
    i.v10n_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.xzs(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda_5).gzt = 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.gzt($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.gzt($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.y10l_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.m10n(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.b10m_1;
    apiUrlConfig$factory_16();
    return this_0.t2();
  }
  function _get_getLocalAccountsSupportedUseCase__hoi7c7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.c10m_1;
    getLocalAccountsSupportedUseCase$factory_0();
    return this_0.t2();
  }
  function _get_createPasskeyUseCase__ryoxza_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.e10m_1;
    createPasskeyUseCase$factory_2();
    return this_0.t2();
  }
  function _get_genderConfig__kyr0zc_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.i10m_1;
    genderConfig$factory_4();
    return this_0.t2();
  }
  function _get_enqueueSavePictureUseCase__rl1s31_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.n10m_1;
    enqueueSavePictureUseCase$factory_2();
    return this_0.t2();
  }
  function sendConsentAndNavigateToMinorWaitScreen($this, showUsernamePassword, $completion) {
    var tmp = new $sendConsentAndNavigateToMinorWaitScreenCOROUTINE$81($this, showUsernamePassword, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function hasErrors_5(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.y10m_1 == null) ? true : !(_this__u8e3s4.x10m_1 == null)) ? true : !(_this__u8e3s4.j10n_1 == null);
  }
  function hasErrorsIfBelow13(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.y10m_1 == null) ? true : !(_this__u8e3s4.x10m_1 == null)) ? true : !(_this__u8e3s4.z10m_1 == null);
  }
  function navigateToAppropriateScreen($this, savePerson) {
    if ($this.y10l_1.t2().a10n_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_126();
      this_0.s('next', $this.z10l_1);
      $this.xqq(this_0, Companion_getInstance_215().vr9_1);
      Companion_getInstance_126();
      $this.wqq(this_0, 'next');
      var tmp$ret$2 = this_0.f3();
      $this.lqp_1.wp8('ChildProfileList', tmp$ret$2);
    } else {
      var goOptions = new UstadGoOptions(VOID, VOID, true);
      var tmp = Napier_getInstance();
      tmp.k5e(VOID, VOID, SignUpViewModel$navigateToAppropriateScreen$lambda($this));
      $this.vqw($this.lqp_1, appendSelectedAccount($this.z10l_1, savePerson.f96_1, new LearningSpace($this.zqp().voc().xnv_1)), goOptions);
    }
  }
  function enrollToCourseFromInviteUid($this, personUid, $completion) {
    var tmp = new $enrollToCourseFromInviteUidCOROUTINE$82($this, personUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_198() {
    Companion_instance_247 = this;
    this.mr9_1 = 'picState';
    this.nr9_1 = 'SignUp';
    this.or9_1 = 'DateOfBirth';
    this.pr9_1 = 'personalAccount';
    this.qr9_1 = 'newOrExisting';
    this.rr9_1 = 'new';
    this.sr9_1 = 'existing';
    this.tr9_1 = 'isMinor';
    this.ur9_1 = 'parentContact';
    var tmp = this;
    Companion_getInstance_117();
    Companion_getInstance_117();
    Companion_getInstance_204();
    tmp.vr9_1 = listOf(['learningSpaceUrl', 'showAccept', 'popUpToOnFinish', 'DateOfBirth', 'RegMode', 'newOrExisting', 'personalAccount', 'isMinor', 'childName', 'childGender', 'childDateOfBirth', 'RefererScreen', 'parentContact', 'ppjUId']);
    this.wr9_1 = 'SignupWithUsernameAndPassword';
  }
  var Companion_instance_247;
  function Companion_getInstance_215() {
    if (Companion_instance_247 == null)
      new Companion_198();
    return Companion_instance_247;
  }
  function SignUpViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.j10p_1 = this$0;
    this.k10p_1 = $savedStateHandle;
    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;
            suspendResult = this.j10p_1.oqq(this.k10p_1, 'otheroptionperson', Companion_instance_3.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.m10p_1 = suspendResult;
            this.n10p_1 = this.m10p_1 == null ? new Person() : this.m10p_1;
            this.hd_1 = 2;
            suspendResult = this.j10p_1.oqq(this.k10p_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.j10p_1.y10l_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (this.n10p_1.h96_1 === '') {
                  tmp_0 = null;
                } else {
                  tmp_0 = this.n10p_1.hks();
                }
                var nextValue = prevValue.m10n(this.n10p_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(SignUpViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$slambda(this.j10p_1, this.k10p_1, completion);
    i.l10p_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new SignUpViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$onClickDone$ref($boundThis) {
    var l = function () {
      $boundThis.iwz();
      return Unit_instance;
    };
    l.callableName = 'onClickDone';
    return l;
  }
  function SignUpViewModel$slambda_1(this$0, resultContinuation) {
    this.w10p_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$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(SignUpViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$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_3.n4r();
            var tmp_1 = SignUpViewModel$slambda$slambda_0(null);
            var tmp_2 = SignUpViewModel$slambda$slambda_2(null);
            suspendResult = this.w10p_1.tqq(tmp_0, VOID, 'otheroptionperson', tmp_1, tmp_2, SignUpViewModel$slambda$lambda(this.w10p_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.w10p_1.tqq(tmp_3, VOID, 'otheroptionpersonprofilepic', tmp_4, tmp_5, SignUpViewModel$slambda$lambda_0(this.w10p_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_1).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$slambda_1(this.w10p_1, completion);
    i.x10p_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$slambda_2(this$0, resultContinuation) {
    var i = new SignUpViewModel$slambda_1(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.g10q_1 = $commitDelay;
    this.h10q_1 = $entity;
    this.i10q_1 = $this;
    this.j10q_1 = $key;
    this.k10q_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.g10q_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.h10q_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.i10q_1.pqq(this.i10q_1.jqp_1, this.j10q_1, this.k10q_1, this.h10q_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.g10q_1, this.h10q_1, this.i10q_1, this.j10q_1, this.k10q_1, completion);
    i.l10q_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$onClickDone$slambda(this$0, resultContinuation) {
    this.u10q_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$onClickDone$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$onClickDone$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$onClickDone$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 = sendConsentAndNavigateToMinorWaitScreen(this.u10q_1, false, 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;
              this.u10q_1.hqq().kq9(new Snack(toString_0(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(SignUpViewModel$onClickDone$slambda).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$onClickDone$slambda(this.u10q_1, completion);
    i.v10q_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$onClickDone$slambda_0(this$0, resultContinuation) {
    var i = new SignUpViewModel$onClickDone$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$sendConsentAndNavigateToMinorWaitScreen$lambda(this$0) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp0_safe_receiver = this$0.y10l_1.t2().p10m_1;
      var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f96_1;
      tmp.fg8_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
      return Unit_instance;
    };
  }
  function SignUpViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation) {
    this.e10r_1 = this$0;
    this.f10r_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.e10r_1.pqq(this.e10r_1.jqp_1, 'picState', Companion_instance_7.n4r(), this.f10r_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.e10r_1, this.f10r_1, completion);
    i.g10r_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.p10r_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.p10r_1.y10l_1.t2().u10m_1;
            tmp_0.r10r_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
            if (isBlank(this.r10r_1))
              return Unit_instance;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.p10r_1.j10m_1.tpq(this.r10r_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var suggestedUsername = suspendResult;
            var tmp0_safe_receiver = this.p10r_1.y10l_1.t2().p10m_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.p10r_1.y10l_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp0_safe_receiver_0 = this.p10r_1.y10l_1.t2().p10m_1;
                var tmp_2 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.g96_1;
                var nextValue = prevValue.m10n(updatedPerson, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.p10r_1.uqw(tmp_2, updatedPerson == null ? null : updatedPerson.g96_1, this.p10r_1.y10l_1.t2().j10n_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.p10r_1.y10l_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.m10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, stringResourceOrMessage(e, this.p10r_1.jqq()));
                  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.p10r_1.y10l_1;
                  while (true) {
                    var prevValue_1 = this_2.t2();
                    var nextValue_1 = prevValue_1.m10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, stringResourceOrMessage(e_0, this.p10r_1.jqq()));
                    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.p10r_1, completion);
    i.q10r_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, this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.h96_1 = $firstName;
      $this$shallowCopy.i96_1 = $lastName;
      var tmp = $this$shallowCopy;
      var tmp0_safe_receiver = this$0.jqp_1.ba('DateOfBirth');
      var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
      tmp.o96_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
      $this$shallowCopy.n96_1 = this$0.y10l_1.t2().g10n_1;
      return Unit_instance;
    };
  }
  function SignUpViewModel$onClickSignup$slambda(this$0, $savePerson, $createPasskeyUseCaseVal, resultContinuation) {
    this.a10s_1 = this$0;
    this.b10s_1 = $savePerson;
    this.c10s_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 = 19;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 18;
            this.id_1 = 15;
            this.hd_1 = 3;
            var tmp_0 = get_doorPrimaryKeyManager(this.a10s_1.dqq());
            suspendResult = tmp_0.o62(9, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.g10s_1 = suspendResult;
            this.b10s_1.f96_1 = this.g10s_1;
            if (!(this.c10s_1 == null)) {
              this.id_1 = 12;
              var tmp_1 = this;
              var tmp0_elvis_lhs = this.b10s_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.h10s_1 = tmp_2;
              this.hd_1 = 4;
              suspendResult = this.c10s_1.upd(this.h10s_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var this_0 = LinkedHashMap_init_$Create$();
              this.a10s_1.xqq(this_0, Companion_getInstance_215().vr9_1);
              Companion_getInstance_126();
              this.a10s_1.wqq(this_0, 'next');
              this_0.s('otheroptionperson', this.a10s_1.m4r().r45(Companion_instance_3.n4r(), this.b10s_1));
              var tmp_3 = this.a10s_1.m4r();
              var tmp_4 = Companion_instance_7.n4r();
              var tmp0_elvis_lhs_0 = this.a10s_1.y10l_1.t2().s10m_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.a10s_1.y10l_1.t2().a10n_1.toString());
              this.a10s_1.lqp_1.wp8('SignupEnterUsernamePassword', this_0.f3());
              this.hd_1 = 14;
              continue $sm;
            }

          case 4:
            this.i10s_1 = suspendResult;
            this.j10s_1 = this.i10s_1;
            var tmp_5 = this.j10s_1;
            if (tmp_5 instanceof PasskeyCreatedResult) {
              this.hd_1 = 5;
              suspendResult = this.a10s_1.zqp().yoc(this.a10s_1.d10m_1, this.i10s_1.n10s_1, this.b10s_1, this.a10s_1.y10l_1.t2().s10m_1, this.a10s_1.y10l_1.t2().h10n_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_6 = this.j10s_1;
              if (tmp_6 instanceof Error_1) {
                l$ret$3: do {
                  var this_1 = this.a10s_1.y10l_1;
                  while (true) {
                    var prevValue = this_1.t2();
                    var nextValue = prevValue.m10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.i10s_1.m10s_1);
                    if (this_1.y1k(prevValue, nextValue)) {
                      break l$ret$3;
                    }
                  }
                }
                 while (false);
                this.hd_1 = 10;
                continue $sm;
              } else {
                var tmp_7 = this.j10s_1;
                if (tmp_7 instanceof UserCanceledResult) {
                  this.hd_1 = 10;
                  continue $sm;
                } else {
                  this.hd_1 = 10;
                  continue $sm;
                }
              }
            }

          case 5:
            this.k10s_1 = this.a10s_1.y10l_1.t2().s10m_1;
            if (!(this.k10s_1 == null)) {
              this.k10s_1.e97_1 = this.b10s_1.f96_1;
              this.k10s_1.f97_1 = systemTimeInMillis();
              this.l10s_1 = this.k10s_1.g97_1;
              this.hd_1 = 6;
              var tmp_8 = _get_enqueueSavePictureUseCase__rl1s31_0(this.a10s_1);
              var tmp_9 = this.b10s_1.f96_1;
              suspendResult = tmp_8.gou(tmp_9, 50, this.l10s_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:
            if (this.a10s_1.y10l_1.t2().h10n_1) {
              this.hd_1 = 11;
              suspendResult = sendConsentAndNavigateToMinorWaitScreen(this.a10s_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 8;
              continue $sm;
            }

          case 8:
            this.hd_1 = 9;
            suspendResult = enrollToCourseFromInviteUid(this.a10s_1, this.b10s_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            navigateToAppropriateScreen(this.a10s_1, this.b10s_1);
            this.hd_1 = 10;
            continue $sm;
          case 10:
            this.id_1 = 15;
            this.hd_1 = 13;
            continue $sm;
          case 11:
            this.f10s_1 = Unit_instance;
            this.id_1 = 19;
            this.hd_1 = 16;
            continue $sm;
          case 12:
            this.id_1 = 15;
            var tmp_10 = this.kd_1;
            if (tmp_10 instanceof Exception) {
              var e = this.kd_1;
              l$ret$5: do {
                var this_2 = this.a10s_1.y10l_1;
                while (true) {
                  var prevValue_0 = this_2.t2();
                  var nextValue_0 = prevValue_0.m10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, stringResourceOrMessage(e, this.a10s_1.jqq()));
                  if (this_2.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
              this.hd_1 = 13;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 13:
            this.id_1 = 15;
            this.hd_1 = 14;
            continue $sm;
          case 14:
            this.e10s_1 = Unit_instance;
            this.id_1 = 19;
            this.hd_1 = 17;
            continue $sm;
          case 15:
            this.id_1 = 18;
            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.a10s_1.hqq().kq9(new Snack(this.a10s_1.jqq().vol(strings_getInstance().xmj_1) + ':' + e_0.message));
              this.f10s_1 = Unit_instance;
              this.id_1 = 19;
              this.hd_1 = 16;
              var tmp_13 = this;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 16:
            this.id_1 = 19;
            this.a10s_1.lqq(Companion_getInstance_98().dq9_1);
            return Unit_instance;
          case 17:
            this.id_1 = 19;
            this.a10s_1.lqq(Companion_getInstance_98().dq9_1);
            return Unit_instance;
          case 18:
            this.id_1 = 19;
            var t = this.kd_1;
            this.a10s_1.lqq(Companion_getInstance_98().dq9_1);
            throw t;
          case 19:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_1 = $p;
        if (this.id_1 === 19) {
          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.a10s_1, this.b10s_1, this.c10s_1, completion);
    i.d10s_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.z10l_1;
    };
  }
  function $sendConsentAndNavigateToMinorWaitScreenCOROUTINE$81(_this__u8e3s4, showUsernamePassword, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.m10o_1 = _this__u8e3s4;
    this.n10o_1 = showUsernamePassword;
  }
  protoOf($sendConsentAndNavigateToMinorWaitScreenCOROUTINE$81).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 = new PersonParentJoin();
            tmp_0.o10o_1 = shallowCopy_11(tmp_1, SignUpViewModel$sendConsentAndNavigateToMinorWaitScreen$lambda(this.m10o_1));
            this.hd_1 = 1;
            suspendResult = this.m10o_1.fqq().x7e().ugs(this.o10o_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.p10o_1 = suspendResult;
            this.hd_1 = 2;
            var tmp0_elvis_lhs = this.m10o_1.y10l_1.t2().u10m_1;
            var tmp_2 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
            var tmp1_safe_receiver = this.m10o_1.y10l_1.t2().p10m_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.l96_1;
            var tmp_3 = tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs;
            var tmp3_elvis_lhs = this.m10o_1.y10l_1.t2().v10m_1;
            suspendResult = this.m10o_1.h10m_1.znv(new SendConsentRequestToParentRequest(tmp_2, this.m10o_1.m10m_1, tmp_3, tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs, this.p10o_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var this_0 = LinkedHashMap_init_$Create$();
            var key = 'username';
            var tmp0_safe_receiver = this.m10o_1.y10l_1.t2().p10m_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g96_1;
            var value = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
            this_0.s(key, value);
            var key_0 = 'showUsernamePassword';
            var value_0 = this.n10o_1.toString();
            this_0.s(key_0, value_0);
            var key_1 = 'parentContact';
            var tmp2_elvis_lhs_0 = this.m10o_1.y10l_1.t2().v10m_1;
            var value_1 = tmp2_elvis_lhs_0 == null ? '' : tmp2_elvis_lhs_0;
            this_0.s(key_1, value_1);
            var key_2 = 'password';
            var tmp3_elvis_lhs_0 = this.m10o_1.y10l_1.t2().q10m_1;
            var value_2 = tmp3_elvis_lhs_0 == null ? '' : tmp3_elvis_lhs_0;
            this_0.s(key_2, value_2);
            var key_3 = 'RefererScreen';
            var tmp4_elvis_lhs = this.m10o_1.jqp_1.ba('RefererScreen');
            var value_3 = tmp4_elvis_lhs == null ? '' : tmp4_elvis_lhs;
            this_0.s(key_3, value_3);
            Companion_getInstance_117();
            putFromSavedStateIfPresent(this_0, this.m10o_1.jqp_1, 'popUpToOnFinish');
            var args = this_0;
            this.m10o_1.lqp_1.uqb('WaitForParent', args, new UstadGoOptions(VOID, VOID, 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);
  };
  function $enrollToCourseFromInviteUidCOROUTINE$82(_this__u8e3s4, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.y10o_1 = _this__u8e3s4;
    this.z10o_1 = personUid;
  }
  protoOf($enrollToCourseFromInviteUidCOROUTINE$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;
            Companion_getInstance_117();
            tmp_0.a10p_1 = this.y10o_1.jqp_1.ba('next');
            var tmp_1;
            if (!(this.a10p_1 == null)) {
              tmp_1 = contains(this.a10p_1, 'ClazzInviteRedeem');
            } else {
              tmp_1 = false;
            }

            if (tmp_1) {
              var tmp_2 = this.y10o_1;
              Companion_getInstance_141();
              tmp_2.z10l_1 = 'CourseListHome';
              this.hd_1 = 1;
              suspendResult = this.y10o_1.o10m_1.kpj(this.a10p_1, this.z10o_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_215();
    destName = destName === VOID ? 'SignUp' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.y10l_1 = MutableStateFlow(new SignUpUiState());
    var tmp = this;
    Companion_getInstance_117();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_141();
      tmp_0 = 'CourseListHome';
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.z10l_1 = tmp_0;
    this.a10m_1 = asStateFlow(this.y10l_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.b10m_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.c10m_1 = Instance(this, tmp$ret$2, null).a5d(this, getLocalAccountsSupportedUseCase$factory());
    var tmp_5 = this;
    Companion_getInstance_117();
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('learningSpaceUrl');
    var tmp1_elvis_lhs = tmp0_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_7(this).jo8_1 : tmp0_elvis_lhs_0;
    tmp_5.d10m_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.d10m_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.e10m_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.d10m_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.f10m_1 = tmp_13.d58(tmp$ret$12, null);
    this.g10m_1 = new ValidateEmailUseCase();
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_1 = new LearningSpace(this.d10m_1);
    var trigger_1 = 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$14 = isInterface(tmp_17, TypeToken) ? tmp_17 : THROW_CCE();
    var tmp$ret$15 = tmp_16.h57(tmp$ret$14, context_1);
    var tmp$ret$16 = On(di, tmp$ret$15, trigger_1);
    var tmp_18 = get_direct(tmp$ret$16).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_19 = typeToken(createKType(getKClass(SendConsentRequestToParentUseCase), arrayOf([]), false));
    var tmp$ret$17 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
    tmp_15.h10m_1 = tmp_18.d58(tmp$ret$17, null);
    var tmp_20 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_21 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$19 = isInterface(tmp_21, TypeToken) ? tmp_21 : THROW_CCE();
    tmp_20.i10m_1 = Instance(this, tmp$ret$19, null).a5d(this, genderConfig$factory_3());
    var tmp_22 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_2 = new LearningSpace(this.d10m_1);
    var trigger_2 = di.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 tmp$ret$23 = On(di, tmp$ret$22, trigger_2);
    var tmp_25 = get_direct(tmp$ret$23).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_26 = typeToken(createKType(getKClass(GetUsernameSuggestionUseCase), arrayOf([]), false));
    var tmp$ret$24 = isInterface(tmp_26, TypeToken) ? tmp_26 : THROW_CCE();
    tmp_22.j10m_1 = tmp_25.d58(tmp$ret$24, null);
    this.k10m_1 = new FilterUsernameUseCase();
    this.l10m_1 = null;
    var tmp_27 = this;
    var tmp0_safe_receiver = savedStateHandle.ba('DateOfBirth');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_27.m10m_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_28 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_3 = new LearningSpace(this.d10m_1);
    var trigger_3 = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_29 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_30 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$26 = isInterface(tmp_30, TypeToken) ? tmp_30 : THROW_CCE();
    var tmp$ret$27 = tmp_29.h57(tmp$ret$26, context_3);
    var this_1 = On(this, tmp$ret$27, trigger_3);
    // Inline function 'org.kodein.type.generic' call
    var tmp_31 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$29 = isInterface(tmp_31, TypeToken) ? tmp_31 : THROW_CCE();
    tmp_28.n10m_1 = Instance(this_1, tmp$ret$29, null).a5d(this, enqueueSavePictureUseCase$factory_1());
    var tmp_32 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_4 = new LearningSpace(this.d10m_1);
    var trigger_4 = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_33 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_34 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$31 = isInterface(tmp_34, TypeToken) ? tmp_34 : THROW_CCE();
    var tmp$ret$32 = tmp_33.h57(tmp$ret$31, context_4);
    var tmp$ret$33 = On(di, tmp$ret$32, trigger_4);
    var tmp_35 = get_direct(tmp$ret$33).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_36 = typeToken(createKType(getKClass(EnrollToCourseFromInviteCodeUseCase), arrayOf([]), false));
    var tmp$ret$34 = isInterface(tmp_36, TypeToken) ? tmp_36 : THROW_CCE();
    tmp_32.o10m_1 = tmp_35.d58(tmp$ret$34, null);
    if (!(savedStateHandle.ba('childName') == null)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.y10l_1;
        while (true) {
          var prevValue = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
          var nextValue = prevValue.m10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_2.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.y10l_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.m10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toBoolean(savedStateHandle.ba('isMinor')));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    this.lqq(Companion_getInstance_98().cq9_1);
    var tmp_37;
    if (this.y10l_1.t2().h10n_1) {
      tmp_37 = this.jqq().vol(strings_getInstance().wnt_1);
    } else {
      tmp_37 = this.jqq().vol(strings_getInstance().bn9_1);
    }
    var title = tmp_37;
    var tmp_38 = this.aqq();
    launch(tmp_38, VOID, VOID, SignUpViewModel$slambda_0(this, savedStateHandle, null));
    if (savedStateHandle.ba('personalAccount') === 'true') {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.y10l_1;
        while (true) {
          var prevValue_1 = this_4.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
          var nextValue_1 = prevValue_1.m10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_4.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
      var tmp_39 = this;
      Companion_getInstance_170();
      tmp_39.z10l_1 = 'ContentEntryListHome';
    }
    $l$block_2: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_5 = this.nqp_1;
      while (true) {
        var prevValue_2 = this_5.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
        var tmp_40 = this.y10l_1.t2().g10n_1 ? this.y10l_1.t2().h10n_1 : false;
        var tmp_41 = this.jqq().vol(strings_getInstance().cml_1);
        var tmp0_actionBarButtonState = new ActionBarButtonUiState(tmp_40, tmp_41, VOID, SignUpViewModel$onClickDone$ref(this));
        var nextValue_2 = new AppUiState(VOID, VOID, title, false, VOID, VOID, false, VOID, tmp0_actionBarButtonState, VOID, false);
        if (this_5.y1k(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    if (savedStateHandle.ba('personalAccount') === 'true') {
      $l$block_3: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_6 = this.y10l_1;
        while (true) {
          var prevValue_3 = this_6.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
          var nextValue_3 = prevValue_3.m10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_6.y1k(prevValue_3, nextValue_3)) {
            break $l$block_3;
          }
        }
      }
      var tmp_42 = this;
      Companion_getInstance_170();
      tmp_42.z10l_1 = 'ContentEntryListHome';
    }
    var tmp_43 = this.aqq();
    launch(tmp_43, VOID, VOID, SignUpViewModel$slambda_2(this, null));
    $l$block_4: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_7 = this.y10l_1;
      while (true) {
        var prevValue_4 = this_7.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
        var tmp2_genderOptions = _get_genderConfig__kyr0zc_1(this).uq9_1;
        var tmp0_dateOfBirth = this.m10m_1;
        var tmp1_isPersonalAccount = this.y10l_1.t2().g10n_1;
        var tmp3_person = new Person(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_isPersonalAccount, tmp0_dateOfBirth);
        var tmp4_serverUrl_ = this.d10m_1;
        var tmp5_passkeySupported = !(_get_createPasskeyUseCase__ryoxza_0(this) == null);
        var tmp6_showOtherOption = (_get_createPasskeyUseCase__ryoxza_0(this) == null ? _get_getLocalAccountsSupportedUseCase__hoi7c7(this).cph() : false) ? !this.y10l_1.t2().h10n_1 : false;
        var tmp7_showPasskeyButton = !(this.y10l_1.t2().h10n_1 ? this.y10l_1.t2().g10n_1 : false);
        var nextValue_4 = prevValue_4.m10n(tmp3_person, VOID, tmp2_genderOptions, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp5_passkeySupported, tmp4_serverUrl_, tmp6_showOtherOption, tmp7_showPasskeyButton);
        if (this_7.y1k(prevValue_4, nextValue_4)) {
          break $l$block_4;
        }
      }
    }
  }
  protoOf(SignUpViewModel).izi = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.y10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.p10m_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l96_1;
        var tmp_0 = this.uqw(tmp, entity == null ? null : entity.l96_1, prevValue.x10m_1);
        var tmp2_safe_receiver = prevValue.p10m_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.g96_1;
        var nextValue = prevValue.m10n(entity, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_0, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.uqw(tmp_1, entity == null ? null : entity.g96_1, prevValue.j10n_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_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.aqq();
    tmp_2.qqv_1 = launch(tmp_3, VOID, VOID, SignUpViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SignUpViewModel).o10s = function (checked) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.y10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onParentCheckChanged.<anonymous>' call
        var nextValue = prevValue.m10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, checked);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).p10s = function (checked) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.y10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onTeacherCheckChanged.<anonymous>' call
        var nextValue = prevValue.m10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, checked);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).iwz = function () {
    var requiredFieldMessage = this.jqq().vol(strings_getInstance().cmp_1);
    var parentEmail = this.y10l_1.t2().v10m_1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.y10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onClickDone.<anonymous>' call
        var tmp;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = this.y10l_1.t2().u10m_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp = requiredFieldMessage;
        } else {
          tmp = null;
        }
        var tmp1_fullNameError = tmp;
        var tmp_0;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        // Inline function 'kotlin.contracts.contract' call
        if (parentEmail == null ? true : charSequenceLength(parentEmail) === 0) {
          tmp_0 = requiredFieldMessage;
        } else {
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onClickDone.<anonymous>.<anonymous>' call
          if (this.g10m_1.zpb(parentEmail) == null) {
            tmp_0 = this.jqq().vol(strings_getInstance().znb_1);
          } else {
            tmp_0 = null;
          }
        }
        var tmp2_parentEmailError = tmp_0;
        var tmp_1;
        var tmp0_safe_receiver = this.y10l_1.t2().p10m_1;
        var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l96_1;
        if (tmp_2 === 0) {
          tmp_1 = requiredFieldMessage;
        } else {
          tmp_1 = null;
        }
        var tmp3_genderError = tmp_1;
        var nextValue = prevValue.m10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_genderError, tmp1_fullNameError, tmp2_parentEmailError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrorsIfBelow13(this.y10l_1.t2(), this)) {
      return Unit_instance;
    }
    var tmp_3 = this.aqq();
    launch(tmp_3, VOID, VOID, SignUpViewModel$onClickDone$slambda_0(this, null));
  };
  protoOf(SignUpViewModel).fzy = 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.y10l_1.t2().s10m_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.y10l_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onPersonPictureChanged.<anonymous>' call
        var nextValue = prevValue.m10n(VOID, VOID, VOID, personPicture);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.aqq();
    launch(tmp_0, VOID, VOID, SignUpViewModel$onPersonPictureChanged$slambda_0(this, personPicture, null));
  };
  protoOf(SignUpViewModel).q10s = function (parentEmail) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.y10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onParentEmailValueChange.<anonymous>' call
        var nextValue = prevValue.m10n(VOID, VOID, VOID, VOID, VOID, VOID, parentEmail);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).r10s = function (fullName) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.y10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onFullNameValueChange.<anonymous>' call
        var nextValue = prevValue.m10n(VOID, VOID, VOID, VOID, VOID, fullName, VOID, VOID, VOID, this.uqw(prevValue.u10m_1, fullName, prevValue.y10m_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).bym = function (newValue) {
    var filteredValue = this.k10m_1.ypg(newValue, '');
    var tmp0_safe_receiver = this.y10l_1.t2().p10m_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.y10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onUsernameChanged.<anonymous>' call
        var tmp2_safe_receiver = this.y10l_1.t2().p10m_1;
        var tmp3_usernameSetByUser = !((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.g96_1) === filteredValue);
        var tmp0_safe_receiver_0 = this.y10l_1.t2().p10m_1;
        var tmp_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.g96_1;
        var tmp4_usernameError = this.uqw(tmp_0, updatedPerson == null ? null : updatedPerson.g96_1, this.y10l_1.t2().j10n_1);
        var nextValue = prevValue.m10n(updatedPerson, VOID, VOID, VOID, VOID, VOID, 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).s10s = function (hasFocused) {
    if (hasFocused)
      return Unit_instance;
    var tmp;
    if (this.y10l_1.t2().k10n_1) {
      // Inline function 'kotlin.text.isNullOrEmpty' call
      var tmp0_safe_receiver = this.y10l_1.t2().p10m_1;
      var this_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hks();
      // 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.l10m_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.aqq();
    tmp_0.l10m_1 = launch(tmp_1, VOID, VOID, SignUpViewModel$onFullNameFocusedChanged$slambda_0(this, null));
  };
  protoOf(SignUpViewModel).t10s = function () {
    this.jqp_1.mql('parentContact', this.y10l_1.t2().v10m_1);
    this.lqq(Companion_getInstance_98().cq9_1);
    var tmp0_safe_receiver = this.y10l_1.t2().u10m_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 tmp1_container = toFirstAndLastNameExt(fullName);
    var firstName = tmp1_container.y6();
    var lastName = tmp1_container.z6();
    var tmp2_safe_receiver = this.y10l_1.t2().p10m_1;
    var tmp_0;
    if (tmp2_safe_receiver == null) {
      tmp_0 = null;
    } else {
      tmp_0 = shallowCopy(tmp2_safe_receiver, SignUpViewModel$onClickSignup$lambda(firstName, lastName, this));
    }
    this.izi(tmp_0);
    var tmp3_elvis_lhs = this.y10l_1.t2().p10m_1;
    var tmp_1;
    if (tmp3_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_1 = tmp3_elvis_lhs;
    }
    var savePerson = tmp_1;
    var requiredFieldMessage = this.jqq().vol(strings_getInstance().cmp_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.y10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onClickSignup.<anonymous>' call
        var tmp_2;
        // 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_2 = requiredFieldMessage;
        } else {
          tmp_2 = null;
        }
        var tmp0_fullNameError = tmp_2;
        var tmp_3;
        var tmp_4 = savePerson.l96_1;
        if (tmp_4 === 0) {
          tmp_3 = requiredFieldMessage;
        } else {
          tmp_3 = null;
        }
        var tmp1_genderError = tmp_3;
        var tmp_5;
        // 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_5 = requiredFieldMessage;
        } else {
          tmp_5 = null;
        }
        var tmp2_usernameError = tmp_5;
        var nextValue = prevValue.m10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_genderError, tmp0_fullNameError, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_usernameError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_5(this.y10l_1.t2(), this)) {
      this.lqq(Companion_getInstance_98().dq9_1);
      return Unit_instance;
    }
    var createPasskeyUseCaseVal = _get_createPasskeyUseCase__ryoxza_0(this);
    var tmp_6 = this.aqq();
    launch(tmp_6, VOID, VOID, SignUpViewModel$onClickSignup$slambda_0(this, savePerson, createPasskeyUseCaseVal, null));
  };
  function SignUpUiState(person, password, genderOptions, personPicture, registrationMode, fullName, parentEmail, dateOfBirthError, genderError, fullNameError, parentEmailError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, showPasskeyButton, isPersonalAccount, isMinor, isParentalConsentForMinor, usernameError, usernameSetByUser, errorText) {
    person = person === VOID ? null : person;
    password = password === VOID ? null : password;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance_0().wq9_1 : genderOptions;
    personPicture = personPicture === VOID ? null : personPicture;
    registrationMode = registrationMode === VOID ? 0 : registrationMode;
    fullName = fullName === VOID ? null : fullName;
    parentEmail = parentEmail === VOID ? null : parentEmail;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    genderError = genderError === VOID ? null : genderError;
    fullNameError = fullNameError === VOID ? null : fullNameError;
    parentEmailError = parentEmailError === VOID ? null : parentEmailError;
    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;
    showPasskeyButton = showPasskeyButton === VOID ? true : showPasskeyButton;
    isPersonalAccount = isPersonalAccount === VOID ? false : isPersonalAccount;
    isMinor = isMinor === VOID ? false : isMinor;
    isParentalConsentForMinor = isParentalConsentForMinor === VOID ? false : isParentalConsentForMinor;
    usernameError = usernameError === VOID ? null : usernameError;
    usernameSetByUser = usernameSetByUser === VOID ? false : usernameSetByUser;
    errorText = errorText === VOID ? null : errorText;
    this.p10m_1 = person;
    this.q10m_1 = password;
    this.r10m_1 = genderOptions;
    this.s10m_1 = personPicture;
    this.t10m_1 = registrationMode;
    this.u10m_1 = fullName;
    this.v10m_1 = parentEmail;
    this.w10m_1 = dateOfBirthError;
    this.x10m_1 = genderError;
    this.y10m_1 = fullNameError;
    this.z10m_1 = parentEmailError;
    this.a10n_1 = isParent;
    this.b10n_1 = isTeacher;
    this.c10n_1 = passkeySupported;
    this.d10n_1 = serverUrl_;
    this.e10n_1 = showOtherOption;
    this.f10n_1 = showPasskeyButton;
    this.g10n_1 = isPersonalAccount;
    this.h10n_1 = isMinor;
    this.i10n_1 = isParentalConsentForMinor;
    this.j10n_1 = usernameError;
    this.k10n_1 = usernameSetByUser;
    this.l10n_1 = errorText;
  }
  protoOf(SignUpUiState).u10s = function (person, password, genderOptions, personPicture, registrationMode, fullName, parentEmail, dateOfBirthError, genderError, fullNameError, parentEmailError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, showPasskeyButton, isPersonalAccount, isMinor, isParentalConsentForMinor, usernameError, usernameSetByUser, errorText) {
    return new SignUpUiState(person, password, genderOptions, personPicture, registrationMode, fullName, parentEmail, dateOfBirthError, genderError, fullNameError, parentEmailError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, showPasskeyButton, isPersonalAccount, isMinor, isParentalConsentForMinor, usernameError, usernameSetByUser, errorText);
  };
  protoOf(SignUpUiState).m10n = function (person, password, genderOptions, personPicture, registrationMode, fullName, parentEmail, dateOfBirthError, genderError, fullNameError, parentEmailError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, showPasskeyButton, isPersonalAccount, isMinor, isParentalConsentForMinor, usernameError, usernameSetByUser, errorText, $super) {
    person = person === VOID ? this.p10m_1 : person;
    password = password === VOID ? this.q10m_1 : password;
    genderOptions = genderOptions === VOID ? this.r10m_1 : genderOptions;
    personPicture = personPicture === VOID ? this.s10m_1 : personPicture;
    registrationMode = registrationMode === VOID ? this.t10m_1 : registrationMode;
    fullName = fullName === VOID ? this.u10m_1 : fullName;
    parentEmail = parentEmail === VOID ? this.v10m_1 : parentEmail;
    dateOfBirthError = dateOfBirthError === VOID ? this.w10m_1 : dateOfBirthError;
    genderError = genderError === VOID ? this.x10m_1 : genderError;
    fullNameError = fullNameError === VOID ? this.y10m_1 : fullNameError;
    parentEmailError = parentEmailError === VOID ? this.z10m_1 : parentEmailError;
    isParent = isParent === VOID ? this.a10n_1 : isParent;
    isTeacher = isTeacher === VOID ? this.b10n_1 : isTeacher;
    passkeySupported = passkeySupported === VOID ? this.c10n_1 : passkeySupported;
    serverUrl_ = serverUrl_ === VOID ? this.d10n_1 : serverUrl_;
    showOtherOption = showOtherOption === VOID ? this.e10n_1 : showOtherOption;
    showPasskeyButton = showPasskeyButton === VOID ? this.f10n_1 : showPasskeyButton;
    isPersonalAccount = isPersonalAccount === VOID ? this.g10n_1 : isPersonalAccount;
    isMinor = isMinor === VOID ? this.h10n_1 : isMinor;
    isParentalConsentForMinor = isParentalConsentForMinor === VOID ? this.i10n_1 : isParentalConsentForMinor;
    usernameError = usernameError === VOID ? this.j10n_1 : usernameError;
    usernameSetByUser = usernameSetByUser === VOID ? this.k10n_1 : usernameSetByUser;
    errorText = errorText === VOID ? this.l10n_1 : errorText;
    return $super === VOID ? this.u10s(person, password, genderOptions, personPicture, registrationMode, fullName, parentEmail, dateOfBirthError, genderError, fullNameError, parentEmailError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, showPasskeyButton, isPersonalAccount, isMinor, isParentalConsentForMinor, usernameError, usernameSetByUser, errorText) : $super.u10s.call(this, person, password, genderOptions, personPicture, registrationMode, fullName, parentEmail, dateOfBirthError, genderError, fullNameError, parentEmailError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, showPasskeyButton, isPersonalAccount, isMinor, isParentalConsentForMinor, usernameError, usernameSetByUser, errorText);
  };
  protoOf(SignUpUiState).toString = function () {
    return 'SignUpUiState(person=' + this.p10m_1 + ', password=' + this.q10m_1 + ', genderOptions=' + this.r10m_1 + ', personPicture=' + this.s10m_1 + ', registrationMode=' + this.t10m_1 + ', fullName=' + this.u10m_1 + ', parentEmail=' + this.v10m_1 + ', dateOfBirthError=' + this.w10m_1 + ', genderError=' + this.x10m_1 + ', fullNameError=' + this.y10m_1 + ', parentEmailError=' + this.z10m_1 + ', isParent=' + this.a10n_1 + ', isTeacher=' + this.b10n_1 + ', passkeySupported=' + this.c10n_1 + ', serverUrl_=' + this.d10n_1 + ', showOtherOption=' + this.e10n_1 + ', showPasskeyButton=' + this.f10n_1 + ', isPersonalAccount=' + this.g10n_1 + ', isMinor=' + this.h10n_1 + ', isParentalConsentForMinor=' + this.i10n_1 + ', usernameError=' + this.j10n_1 + ', usernameSetByUser=' + this.k10n_1 + ', errorText=' + this.l10n_1 + ')';
  };
  protoOf(SignUpUiState).hashCode = function () {
    var result = this.p10m_1 == null ? 0 : this.p10m_1.hashCode();
    result = imul(result, 31) + (this.q10m_1 == null ? 0 : getStringHashCode(this.q10m_1)) | 0;
    result = imul(result, 31) + hashCode(this.r10m_1) | 0;
    result = imul(result, 31) + (this.s10m_1 == null ? 0 : this.s10m_1.hashCode()) | 0;
    result = imul(result, 31) + this.t10m_1 | 0;
    result = imul(result, 31) + (this.u10m_1 == null ? 0 : getStringHashCode(this.u10m_1)) | 0;
    result = imul(result, 31) + (this.v10m_1 == null ? 0 : getStringHashCode(this.v10m_1)) | 0;
    result = imul(result, 31) + (this.w10m_1 == null ? 0 : getStringHashCode(this.w10m_1)) | 0;
    result = imul(result, 31) + (this.x10m_1 == null ? 0 : getStringHashCode(this.x10m_1)) | 0;
    result = imul(result, 31) + (this.y10m_1 == null ? 0 : getStringHashCode(this.y10m_1)) | 0;
    result = imul(result, 31) + (this.z10m_1 == null ? 0 : getStringHashCode(this.z10m_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.a10n_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.b10n_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.c10n_1) | 0;
    result = imul(result, 31) + (this.d10n_1 == null ? 0 : getStringHashCode(this.d10n_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.e10n_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.f10n_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.g10n_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.h10n_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.i10n_1) | 0;
    result = imul(result, 31) + (this.j10n_1 == null ? 0 : getStringHashCode(this.j10n_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.k10n_1) | 0;
    result = imul(result, 31) + (this.l10n_1 == null ? 0 : getStringHashCode(this.l10n_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.p10m_1, tmp0_other_with_cast.p10m_1))
      return false;
    if (!(this.q10m_1 == tmp0_other_with_cast.q10m_1))
      return false;
    if (!equals(this.r10m_1, tmp0_other_with_cast.r10m_1))
      return false;
    if (!equals(this.s10m_1, tmp0_other_with_cast.s10m_1))
      return false;
    if (!(this.t10m_1 === tmp0_other_with_cast.t10m_1))
      return false;
    if (!(this.u10m_1 == tmp0_other_with_cast.u10m_1))
      return false;
    if (!(this.v10m_1 == tmp0_other_with_cast.v10m_1))
      return false;
    if (!(this.w10m_1 == tmp0_other_with_cast.w10m_1))
      return false;
    if (!(this.x10m_1 == tmp0_other_with_cast.x10m_1))
      return false;
    if (!(this.y10m_1 == tmp0_other_with_cast.y10m_1))
      return false;
    if (!(this.z10m_1 == tmp0_other_with_cast.z10m_1))
      return false;
    if (!(this.a10n_1 === tmp0_other_with_cast.a10n_1))
      return false;
    if (!(this.b10n_1 === tmp0_other_with_cast.b10n_1))
      return false;
    if (!(this.c10n_1 === tmp0_other_with_cast.c10n_1))
      return false;
    if (!(this.d10n_1 == tmp0_other_with_cast.d10n_1))
      return false;
    if (!(this.e10n_1 === tmp0_other_with_cast.e10n_1))
      return false;
    if (!(this.f10n_1 === tmp0_other_with_cast.f10n_1))
      return false;
    if (!(this.g10n_1 === tmp0_other_with_cast.g10n_1))
      return false;
    if (!(this.h10n_1 === tmp0_other_with_cast.h10n_1))
      return false;
    if (!(this.i10n_1 === tmp0_other_with_cast.i10n_1))
      return false;
    if (!(this.j10n_1 == tmp0_other_with_cast.j10n_1))
      return false;
    if (!(this.k10n_1 === tmp0_other_with_cast.k10n_1))
      return false;
    if (!(this.l10n_1 == tmp0_other_with_cast.l10n_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.v10t_1;
    apiUrlConfig$factory_18();
    return this_0.t2();
  }
  function _get_genderConfig__kyr0zc_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.b10u_1;
    genderConfig$factory_6();
    return this_0.t2();
  }
  function _get_enqueueSavePictureUseCase__rl1s31_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.d10u_1;
    enqueueSavePictureUseCase$factory_4();
    return this_0.t2();
  }
  function hasErrors_6(_this__u8e3s4, $this) {
    return !(_this__u8e3s4.m10u_1 == null);
  }
  function navigateToAppropriateScreen_0($this, savePerson) {
    if ($this.w10t_1) {
      var tmp;
      if (!$this.x10t_1) {
        tmp = !($this.jqp_1.ba('childName') == null);
      } else {
        tmp = false;
      }
      if (tmp) {
        navigateToConsentManagementScreen_0($this);
      } 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.signup.SignupEnterUsernamePasswordViewModel.navigateToAppropriateScreen.<anonymous>' call
        Companion_getInstance_126();
        this_0.s('next', $this.t10t_1);
        $this.xqq(this_0, Companion_getInstance_215().vr9_1);
        Companion_getInstance_126();
        $this.wqq(this_0, 'next');
        var tmp$ret$2 = this_0.f3();
        $this.lqp_1.wp8('ChildProfileList', tmp$ret$2);
      }
    } else if ($this.y10t_1) {
      var tmp_0 = $this.aqq();
      launch(tmp_0, VOID, VOID, SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$slambda_0($this, null));
    } else {
      var goOptions = new UstadGoOptions(VOID, VOID, true);
      var tmp_1 = Napier_getInstance();
      tmp_1.k5e(VOID, VOID, SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$lambda($this));
      $this.vqw($this.lqp_1, appendSelectedAccount($this.t10t_1, savePerson.f96_1, new LearningSpace($this.zqp().voc().xnv_1)), goOptions);
    }
  }
  function navigateToConsentManagementScreen_0($this) {
    var tmp = $this.aqq();
    launch(tmp, VOID, VOID, SignupEnterUsernamePasswordViewModel$navigateToConsentManagementScreen$slambda_0($this, null));
  }
  function sendConsentAndNavigateToMinorWaitScreen_0($this, showUsernamePassword, $completion) {
    var tmp = new $sendConsentAndNavigateToMinorWaitScreenCOROUTINE$83($this, showUsernamePassword, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_199() {
    this.g10v_1 = 'SignupEnterUsernamePassword';
  }
  var Companion_instance_248;
  function Companion_getInstance_216() {
    return Companion_instance_248;
  }
  function SignupEnterUsernamePasswordViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.p10v_1 = this$0;
    this.q10v_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.p10v_1.oqq(this.q10v_1, 'otheroptionperson', Companion_instance_3.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.s10v_1 = suspendResult;
            this.t10v_1 = this.s10v_1 == null ? new Person() : this.s10v_1;
            this.hd_1 = 2;
            suspendResult = this.p10v_1.oqq(this.q10v_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.p10v_1.s10t_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (this.t10v_1.h96_1 === '') {
                  tmp_0 = null;
                } else {
                  tmp_0 = this.t10v_1.hks();
                }
                var nextValue = prevValue.u10v(this.t10v_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.p10v_1, this.q10v_1, completion);
    i.r10v_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.d10w_1 = $commitDelay;
    this.e10w_1 = $entity;
    this.f10w_1 = $this;
    this.g10w_1 = $key;
    this.h10w_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.d10w_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.e10w_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.f10w_1.pqq(this.f10w_1.jqp_1, this.g10w_1, this.h10w_1, this.e10w_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.d10w_1, this.e10w_1, this.f10w_1, this.g10w_1, this.h10w_1, completion);
    i.i10w_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, this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.h96_1 = $firstName;
      $this$shallowCopy.i96_1 = $lastName;
      var tmp = $this$shallowCopy;
      Companion_getInstance_215();
      var tmp0_safe_receiver = this$0.jqp_1.ba('DateOfBirth');
      var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
      tmp.o96_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
      $this$shallowCopy.n96_1 = this$0.s10t_1.t2().s10u_1;
      return Unit_instance;
    };
  }
  function SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda(this$0, $savePerson, resultContinuation) {
    this.r10w_1 = this$0;
    this.s10w_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.r10w_1.dqq());
            suspendResult = tmp_0.o62(9, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.w10w_1 = suspendResult;
            this.s10w_1.f96_1 = this.w10w_1;
            this.x10w_1 = this.r10w_1.s10t_1.t2().h10u_1;
            if (this.x10w_1 == null) {
              this.v10w_1 = Unit_instance;
              this.id_1 = 16;
              this.hd_1 = 17;
              var tmp_1 = this;
              continue $sm;
            } else {
              this.y10w_1 = this.x10w_1;
              this.hd_1 = 4;
              continue $sm;
            }

          case 4:
            this.z10w_1 = this.y10w_1;
            var tmp_2 = this;
            Companion_getInstance_215();
            tmp_2.a10x_1 = new PersonParentJoin(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.r10w_1.jqp_1.ba('parentContact'));
            this.hd_1 = 5;
            suspendResult = this.r10w_1.zqp().zoc(this.s10w_1, this.z10w_1, this.r10w_1.z10t_1, new AccountRegisterOptions(!this.r10w_1.y10t_1, this.a10x_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.b10x_1 = suspendResult;
            this.c10x_1 = this.r10w_1.s10t_1.t2().j10u_1;
            if (!(this.c10x_1 == null)) {
              this.c10x_1.e97_1 = this.s10w_1.f96_1;
              this.c10x_1.f97_1 = systemTimeInMillis();
              this.d10x_1 = this.c10x_1.g97_1;
              this.hd_1 = 6;
              var tmp_3 = _get_enqueueSavePictureUseCase__rl1s31_1(this.r10w_1);
              var tmp_4 = this.s10w_1.f96_1;
              suspendResult = tmp_3.gou(tmp_4, 50, this.d10x_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_5 = this;
            var this_0 = this.r10w_1.a57();
            var context = new LearningSpace(this.r10w_1.z10t_1);
            var trigger = this_0.d57();
            var tmp_6 = Companion_instance_0;
            var tmp_7 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_8 = get_direct(On(this_0, tmp_6.h57(isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE(), context), trigger)).f58();
            var tmp_9 = typeToken(createKType(getKClass(SavePasswordUseCase), arrayOf([]), false));
            tmp_5.e10x_1 = tmp_8.e58(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), null);
            this.f10x_1 = this.e10x_1;
            if (this.f10x_1 == null) {
              this.g10x_1 = null;
              this.hd_1 = 9;
              continue $sm;
            } else {
              this.hd_1 = 8;
              suspendResult = this.f10x_1.apf(toString_0(this.s10w_1.g96_1), this.z10w_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 8:
            var tmp_10 = this;
            tmp_10.g10x_1 = Unit_instance;
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.id_1 = 12;
            var tmp_11 = this;
            Companion_getInstance_117();
            tmp_11.h10x_1 = this.r10w_1.jqp_1.ba('next');
            if (!(this.h10x_1 == null) ? contains(this.h10x_1, 'ClazzInviteRedeem') : false) {
              var tmp_12 = this.r10w_1;
              Companion_getInstance_141();
              tmp_12.t10t_1 = 'CourseListHome';
              this.hd_1 = 10;
              suspendResult = this.r10w_1.c10u_1.kpj(this.h10x_1, this.s10w_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_13 = this.kd_1;
            if (tmp_13 instanceof Exception) {
              var e = this.kd_1;
              var tmp_14 = Napier_getInstance();
              tmp_14.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_15 = this;
            navigateToAppropriateScreen_0(this.r10w_1, this.b10x_1);
            tmp_15.u10w_1 = Unit_instance;
            this.id_1 = 16;
            this.hd_1 = 18;
            continue $sm;
          case 14:
            this.id_1 = 15;
            var tmp_16 = this.kd_1;
            if (tmp_16 instanceof Exception) {
              var e_0 = this.kd_1;
              if (e_0 instanceof IllegalStateException) {
                l$ret$5: do {
                  var this_1 = this.r10w_1.s10t_1;
                  while (true) {
                    var prevValue = this_1.t2();
                    var nextValue = prevValue.u10v(VOID, VOID, VOID, VOID, VOID, VOID, this.r10w_1.jqq().vol(strings_getInstance().fn9_1));
                    if (this_1.y1k(prevValue, nextValue)) {
                      break l$ret$5;
                    }
                  }
                }
                 while (false);
              } else {
                this.r10w_1.hqq().kq9(new Snack(this.r10w_1.jqq().vol(strings_getInstance().hmk_1)));
              }
              this.v10w_1 = Unit_instance;
              this.id_1 = 16;
              this.hd_1 = 17;
              var tmp_17 = this;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 15:
            this.id_1 = 16;
            var t = this.kd_1;
            this.r10w_1.lqq(Companion_getInstance_98().dq9_1);
            throw t;
          case 16:
            throw this.kd_1;
          case 17:
            this.id_1 = 16;
            this.r10w_1.lqq(Companion_getInstance_98().dq9_1);
            return Unit_instance;
          case 18:
            this.id_1 = 16;
            this.r10w_1.lqq(Companion_getInstance_98().dq9_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.r10w_1, this.s10w_1, completion);
    i.t10w_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$slambda(this$0, resultContinuation) {
    this.q10x_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$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$navigateToAppropriateScreen$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$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 = sendConsentAndNavigateToMinorWaitScreen_0(this.q10x_1, true, 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(SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$slambda).v1m = function ($this$launch, completion) {
    var i = new SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$slambda(this.q10x_1, completion);
    i.r10x_1 = $this$launch;
    return i;
  };
  function SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$slambda_0(this$0, resultContinuation) {
    var i = new SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$slambda(this$0, 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.t10t_1;
    };
  }
  function SignupEnterUsernamePasswordViewModel$navigateToConsentManagementScreen$slambda(this$0, resultContinuation) {
    this.a10y_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignupEnterUsernamePasswordViewModel$navigateToConsentManagementScreen$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$navigateToConsentManagementScreen$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$navigateToConsentManagementScreen$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.a10y_1.jqp_1.ba('ppjUId');
          var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
          var ppjUid = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
          var this_0 = LinkedHashMap_init_$Create$();
          Companion_getInstance_126();
          var key = 'entityUid';
          var value = ppjUid.toString();
          this_0.s(key, value);
          Companion_getInstance_126();
          Companion_getInstance_117();
          this_0.s('next', '');
          var args = this_0;
          this.a10y_1.lqp_1.wp8('ParentalConsentManagement', args);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$navigateToConsentManagementScreen$slambda).v1m = function ($this$launch, completion) {
    var i = new SignupEnterUsernamePasswordViewModel$navigateToConsentManagementScreen$slambda(this.a10y_1, completion);
    i.b10y_1 = $this$launch;
    return i;
  };
  function SignupEnterUsernamePasswordViewModel$navigateToConsentManagementScreen$slambda_0(this$0, resultContinuation) {
    var i = new SignupEnterUsernamePasswordViewModel$navigateToConsentManagementScreen$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $sendConsentAndNavigateToMinorWaitScreenCOROUTINE$83(_this__u8e3s4, showUsernamePassword, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.b10v_1 = _this__u8e3s4;
    this.c10v_1 = showUsernamePassword;
  }
  protoOf($sendConsentAndNavigateToMinorWaitScreenCOROUTINE$83).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;
            var tmp0_elvis_lhs = this.b10v_1.s10t_1.t2().g10u_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('child details are empty');
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.d10v_1 = tmp_1;
            var tmp_2 = this;
            Companion_getInstance_215();
            tmp_2.e10v_1 = this.b10v_1.jqp_1.ba('parentContact');
            this.hd_1 = 1;
            suspendResult = this.b10v_1.f10u_1.x7e().wgs(this.d10v_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.f10v_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_3 = this.d10v_1.hks();
            var tmp_4 = this.d10v_1.o96_1;
            var tmp_5 = this.d10v_1.l96_1;
            var tmp1_elvis_lhs = this.e10v_1;
            suspendResult = this.b10v_1.e10u_1.znv(new SendConsentRequestToParentRequest(tmp_3, tmp_4, tmp_5, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs, this.f10v_1.zg7_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var this_0 = LinkedHashMap_init_$Create$();
            var key = 'username';
            var tmp0_safe_receiver = this.b10v_1.s10t_1.t2().g10u_1;
            var tmp1_elvis_lhs_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g96_1;
            var value = tmp1_elvis_lhs_0 == null ? '' : tmp1_elvis_lhs_0;
            this_0.s(key, value);
            var key_0 = 'showUsernamePassword';
            var value_0 = this.c10v_1.toString();
            this_0.s(key_0, value_0);
            var key_1 = 'parentContact';
            var tmp2_elvis_lhs = this.e10v_1;
            var value_1 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
            this_0.s(key_1, value_1);
            var key_2 = 'password';
            this_0.s(key_2, '');
            Companion_getInstance_117();
            putFromSavedStateIfPresent(this_0, this.b10v_1.jqp_1, 'popUpToOnFinish');
            var key_3 = 'RefererScreen';
            var value_2 = 'AddAccountSelectNewOrExisting';
            this_0.s(key_3, value_2);
            var args = this_0;
            this.b10v_1.lqp_1.uqb('WaitForParent', args, new UstadGoOptions(VOID, VOID, true));
            this.id_1 = 4;
            this.hd_1 = 5;
            continue $sm;
          case 3:
            this.id_1 = 4;
            var tmp_6 = this.kd_1;
            if (tmp_6 instanceof Exception) {
              var e = this.kd_1;
              Napier_getInstance().q5e('Error : ' + e.message, e);
              this.hd_1 = 5;
              continue $sm;
            } 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 SignupEnterUsernamePasswordViewModel(di, savedStateHandle, destName) {
    destName = destName === VOID ? 'SignupEnterUsernamePassword' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.s10t_1 = MutableStateFlow(new SignupEnterUsernamePasswordUiState());
    var tmp = this;
    Companion_getInstance_117();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_141();
      tmp_0 = 'CourseListHome';
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.t10t_1 = tmp_0;
    this.u10t_1 = asStateFlow(this.s10t_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.v10t_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_17());
    var tmp_3 = this;
    tmp_3.w10t_1 = toBoolean(savedStateHandle.ba('isparent'));
    var tmp_4 = this;
    Companion_getInstance_215();
    tmp_4.x10t_1 = toBoolean(savedStateHandle.ba('personalAccount'));
    var tmp_5 = this;
    Companion_getInstance_215();
    tmp_5.y10t_1 = toBoolean(savedStateHandle.ba('isMinor'));
    var tmp_6 = this;
    Companion_getInstance_117();
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('learningSpaceUrl');
    var tmp1_elvis_lhs = tmp0_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_8(this).jo8_1 : tmp0_elvis_lhs_0;
    tmp_6.z10t_1 = tmp1_elvis_lhs == null ? 'http://localhost' : tmp1_elvis_lhs;
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = new LearningSpace(this.z10t_1);
    var trigger = di.d57();
    // 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$2 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    var tmp$ret$3 = tmp_8.h57(tmp$ret$2, context);
    var tmp$ret$4 = On(di, tmp$ret$3, trigger);
    var tmp_10 = get_direct(tmp$ret$4).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_7.a10u_1 = tmp_10.d58(tmp$ret$5, 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(GenderConfig), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.b10u_1 = Instance(this, tmp$ret$7, null).a5d(this, genderConfig$factory_5());
    var tmp_14 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = new LearningSpace(this.z10t_1);
    var trigger_0 = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_15 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    var tmp$ret$10 = tmp_15.h57(tmp$ret$9, context_0);
    var tmp$ret$11 = On(di, tmp$ret$10, trigger_0);
    var tmp_17 = get_direct(tmp$ret$11).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(EnrollToCourseFromInviteCodeUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_14.c10u_1 = tmp_17.d58(tmp$ret$12, null);
    var tmp_19 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_1 = new LearningSpace(this.z10t_1);
    var trigger_1 = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_20 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_21 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_21, TypeToken) ? tmp_21 : THROW_CCE();
    var tmp$ret$15 = tmp_20.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_22 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$17 = isInterface(tmp_22, TypeToken) ? tmp_22 : THROW_CCE();
    tmp_19.d10u_1 = Instance(this_0, tmp$ret$17, null).a5d(this, enqueueSavePictureUseCase$factory_3());
    var tmp_23 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_2 = new LearningSpace(this.z10t_1);
    var trigger_2 = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_24 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_25 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$19 = isInterface(tmp_25, TypeToken) ? tmp_25 : THROW_CCE();
    var tmp$ret$20 = tmp_24.h57(tmp$ret$19, context_2);
    var tmp$ret$21 = On(di, tmp$ret$20, trigger_2);
    var tmp_26 = get_direct(tmp$ret$21).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_27 = typeToken(createKType(getKClass(SendConsentRequestToParentUseCase), arrayOf([]), false));
    var tmp$ret$22 = isInterface(tmp_27, TypeToken) ? tmp_27 : THROW_CCE();
    tmp_23.e10u_1 = tmp_26.d58(tmp$ret$22, null);
    var tmp_28 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_3 = new LearningSpace(this.z10t_1);
    var trigger_3 = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_29 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_30 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$24 = isInterface(tmp_30, TypeToken) ? tmp_30 : THROW_CCE();
    var tmp$ret$25 = tmp_29.h57(tmp$ret$24, context_3);
    var tmp$ret$26 = On(di, tmp$ret$25, trigger_3);
    var tmp_31 = get_direct(tmp$ret$26).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_32 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$27 = isInterface(tmp_32, TypeToken) ? tmp_32 : THROW_CCE();
    tmp_28.f10u_1 = tmp_31.d58(tmp$ret$27, null).ak4();
    this.lqq(Companion_getInstance_98().cq9_1);
    var title = this.jqq().vol(strings_getInstance().bn9_1);
    var tmp_33 = this.aqq();
    launch(tmp_33, VOID, VOID, SignupEnterUsernamePasswordViewModel$slambda_0(this, savedStateHandle, null));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nqp_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_215();
    if (savedStateHandle.ba('personalAccount') === 'true') {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.s10t_1;
        while (true) {
          var prevValue_0 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.u10v(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_34 = this;
      Companion_getInstance_170();
      tmp_34.t10t_1 = 'ContentEntryListHome';
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.s10t_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).uq9_1;
        Companion_getInstance_204();
        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.s10t_1.t2().s10u_1;
        var tmp5_person = new Person(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_isPersonalAccount, tmp2_dateOfBirth);
        var nextValue_1 = prevValue_1.u10v(tmp5_person, VOID, tmp4_genderOptions);
        if (this_3.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
  }
  protoOf(SignupEnterUsernamePasswordViewModel).izi = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.s10t_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.u10v(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_126();
    var key = 'entityState';
    var tmp0_safe_receiver = this.qqv_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.aqq();
    tmp.qqv_1 = launch(tmp_0, VOID, VOID, SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SignupEnterUsernamePasswordViewModel).ezy = function (password) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.s10t_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.u10v(VOID, password, VOID, VOID, VOID, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignupEnterUsernamePasswordViewModel).c10y = function () {
    this.lqq(Companion_getInstance_98().cq9_1);
    var tmp0_safe_receiver = this.s10t_1.t2().l10u_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 tmp1_container = toFirstAndLastNameExt(fullName);
    var firstName = tmp1_container.y6();
    var lastName = tmp1_container.z6();
    var tmp2_safe_receiver = this.s10t_1.t2().g10u_1;
    var tmp_0;
    if (tmp2_safe_receiver == null) {
      tmp_0 = null;
    } else {
      tmp_0 = shallowCopy(tmp2_safe_receiver, SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$lambda(firstName, lastName, this));
    }
    this.izi(tmp_0);
    var tmp3_elvis_lhs = this.s10t_1.t2().g10u_1;
    var tmp_1;
    if (tmp3_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_1 = tmp3_elvis_lhs;
    }
    var savePerson = tmp_1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.s10t_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onClickedSignupEnterUsernamePassword.<anonymous>' call
        var tmp_2;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = prevValue.h10u_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_2 = this.jqq().vol(strings_getInstance().cmp_1);
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.u10v(VOID, VOID, VOID, VOID, VOID, VOID, tmp_2);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_6(this.s10t_1.t2(), this)) {
      this.lqq(Companion_getInstance_98().dq9_1);
      return Unit_instance;
    }
    var tmp_3 = this.aqq();
    launch(tmp_3, 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().wq9_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.g10u_1 = person;
    this.h10u_1 = password;
    this.i10u_1 = genderOptions;
    this.j10u_1 = personPicture;
    this.k10u_1 = registrationMode;
    this.l10u_1 = firstName;
    this.m10u_1 = passwordError;
    this.n10u_1 = dateOfBirthError;
    this.o10u_1 = parentContactError;
    this.p10u_1 = genderError;
    this.q10u_1 = fullNameError;
    this.r10u_1 = passkeySupported;
    this.s10u_1 = isPersonalAccount;
  }
  protoOf(SignupEnterUsernamePasswordUiState).d10y = 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).u10v = function (person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount, $super) {
    person = person === VOID ? this.g10u_1 : person;
    password = password === VOID ? this.h10u_1 : password;
    genderOptions = genderOptions === VOID ? this.i10u_1 : genderOptions;
    personPicture = personPicture === VOID ? this.j10u_1 : personPicture;
    registrationMode = registrationMode === VOID ? this.k10u_1 : registrationMode;
    firstName = firstName === VOID ? this.l10u_1 : firstName;
    passwordError = passwordError === VOID ? this.m10u_1 : passwordError;
    dateOfBirthError = dateOfBirthError === VOID ? this.n10u_1 : dateOfBirthError;
    parentContactError = parentContactError === VOID ? this.o10u_1 : parentContactError;
    genderError = genderError === VOID ? this.p10u_1 : genderError;
    fullNameError = fullNameError === VOID ? this.q10u_1 : fullNameError;
    passkeySupported = passkeySupported === VOID ? this.r10u_1 : passkeySupported;
    isPersonalAccount = isPersonalAccount === VOID ? this.s10u_1 : isPersonalAccount;
    return $super === VOID ? this.d10y(person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount) : $super.d10y.call(this, person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount);
  };
  protoOf(SignupEnterUsernamePasswordUiState).toString = function () {
    return 'SignupEnterUsernamePasswordUiState(person=' + this.g10u_1 + ', password=' + this.h10u_1 + ', genderOptions=' + this.i10u_1 + ', personPicture=' + this.j10u_1 + ', registrationMode=' + this.k10u_1 + ', firstName=' + this.l10u_1 + ', passwordError=' + this.m10u_1 + ', dateOfBirthError=' + this.n10u_1 + ', parentContactError=' + this.o10u_1 + ', genderError=' + this.p10u_1 + ', fullNameError=' + this.q10u_1 + ', passkeySupported=' + this.r10u_1 + ', isPersonalAccount=' + this.s10u_1 + ')';
  };
  protoOf(SignupEnterUsernamePasswordUiState).hashCode = function () {
    var result = this.g10u_1 == null ? 0 : this.g10u_1.hashCode();
    result = imul(result, 31) + (this.h10u_1 == null ? 0 : getStringHashCode(this.h10u_1)) | 0;
    result = imul(result, 31) + hashCode(this.i10u_1) | 0;
    result = imul(result, 31) + (this.j10u_1 == null ? 0 : this.j10u_1.hashCode()) | 0;
    result = imul(result, 31) + this.k10u_1 | 0;
    result = imul(result, 31) + (this.l10u_1 == null ? 0 : getStringHashCode(this.l10u_1)) | 0;
    result = imul(result, 31) + (this.m10u_1 == null ? 0 : getStringHashCode(this.m10u_1)) | 0;
    result = imul(result, 31) + (this.n10u_1 == null ? 0 : getStringHashCode(this.n10u_1)) | 0;
    result = imul(result, 31) + (this.o10u_1 == null ? 0 : getStringHashCode(this.o10u_1)) | 0;
    result = imul(result, 31) + (this.p10u_1 == null ? 0 : getStringHashCode(this.p10u_1)) | 0;
    result = imul(result, 31) + (this.q10u_1 == null ? 0 : getStringHashCode(this.q10u_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.r10u_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.s10u_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.g10u_1, tmp0_other_with_cast.g10u_1))
      return false;
    if (!(this.h10u_1 == tmp0_other_with_cast.h10u_1))
      return false;
    if (!equals(this.i10u_1, tmp0_other_with_cast.i10u_1))
      return false;
    if (!equals(this.j10u_1, tmp0_other_with_cast.j10u_1))
      return false;
    if (!(this.k10u_1 === tmp0_other_with_cast.k10u_1))
      return false;
    if (!(this.l10u_1 == tmp0_other_with_cast.l10u_1))
      return false;
    if (!(this.m10u_1 == tmp0_other_with_cast.m10u_1))
      return false;
    if (!(this.n10u_1 == tmp0_other_with_cast.n10u_1))
      return false;
    if (!(this.o10u_1 == tmp0_other_with_cast.o10u_1))
      return false;
    if (!(this.p10u_1 == tmp0_other_with_cast.p10u_1))
      return false;
    if (!(this.q10u_1 == tmp0_other_with_cast.q10u_1))
      return false;
    if (!(this.r10u_1 === tmp0_other_with_cast.r10u_1))
      return false;
    if (!(this.s10u_1 === tmp0_other_with_cast.s10u_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).o10y = function (site, hasAdminPermission, $completion) {
    var tmp = this.p10y(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.o10y(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.m10y_1, this.n10y_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).p10y = function (site, hasAdminPermission, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.m10y_1 = site;
    i.n10y_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.o10y(site, hasAdminPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.y10y_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).a10z = function (it, $completion) {
    var tmp = this.b10z(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.a10z(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.z10y_1;
          var entity = tmp0_container.y6();
          var hasEditSitePermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.y10y_1.y10z_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.c110(entity);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.y10y_1.nqp_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.vq8(prevValue_0.gq8_1.bq9(!(this.z10y_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).b10z = function (it, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this.y10y_1, completion);
    i.z10y_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.a10z(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, $uiLangList, resultContinuation) {
    this.l110_1 = this$0;
    this.m110_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).o110 = function (it, $completion) {
    var tmp = this.p110(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.o110((!(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.l110_1.y10z_1;
            while (true) {
              var prevValue = this_0.t2();
              var this_1 = this.n110_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.m110_1.w();
                  while (tmp0_iterator_0.f()) {
                    var element_0 = tmp0_iterator_0.e();
                    if (element_0.qq6_1 === element.khu_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.rq6_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.c110(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).p110 = function (it, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this.l110_1, this.m110_1, completion);
    i.n110_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.o110(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda($siteFlow, $permissionFlow, this$0, resultContinuation) {
    this.y110_1 = $siteFlow;
    this.z110_1 = $permissionFlow;
    this.a111_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.y110_1, this.z110_1, SiteDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            var tmp_1 = SiteDetailViewModel$slambda$slambda$slambda$slambda_2(this.a111_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.y110_1, this.z110_1, this.a111_1, completion);
    i.b111_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.k111_1 = this$0;
    this.l111_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.k111_1.fqq().w7e().kht(1);
            var tmp_1 = SiteDetailViewModel$slambda$slambda$slambda$slambda_4(this.k111_1, this.l111_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.k111_1, this.l111_1, completion);
    i.m111_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.v111_1 = this$0;
    this.w111_1 = $this_launch;
    this.x111_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.v111_1.fqq().v7e().rho();
          var tmp_0 = this.v111_1.fqq().p7f();
          var tmp_1 = this.v111_1.bqq();
          PermissionFlags_getInstance();
          var permissionFlow = tmp_0.zi1(tmp_1, new Long(16384, 0));
          launch(this.w111_1, VOID, VOID, SiteDetailViewModel$slambda$slambda$slambda_0(siteFlow, permissionFlow, this.v111_1, null));
          launch(this.w111_1, VOID, VOID, SiteDetailViewModel$slambda$slambda$slambda_2(this.v111_1, this.x111_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.v111_1, this.w111_1, this.x111_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_200() {
    this.y111_1 = 'Community';
  }
  var Companion_instance_249;
  function Companion_getInstance_217() {
    return Companion_instance_249;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_39(function_0) {
    this.z111_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_39).t1d = function (value, $completion) {
    return this.z111_1(value, $completion);
  };
  function SiteDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.vx9();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function SiteDetailViewModel$slambda(this$0, $uiLangList, resultContinuation) {
    this.i112_1 = this$0;
    this.j112_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.i112_1.y10z_1, SiteDetailViewModel$slambda$slambda_0(this.i112_1, this.k112_1, this.j112_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.i112_1, this.j112_1, completion);
    i.k112_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.y10z_1 = MutableStateFlow(new SiteDetailUiState());
    this.z10z_1 = asStateFlow(this.y10z_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.qpo_1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.detail.SiteDetailViewModel.<anonymous>' call
        var tmp0_text = this.jqq().vol(strings_getInstance().amx_1);
        var tmp1_onClick = SiteDetailViewModel$onClickEdit$ref(this);
        var tmp2_icon = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.vq8(new FabUiState(false, tmp0_text, tmp2_icon, tmp1_onClick), VOID, this.jqq().vol(strings_getInstance().knb_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = this.aqq();
    launch(tmp_1, VOID, VOID, SiteDetailViewModel$slambda_0(this, uiLangList, null));
  }
  protoOf(SiteDetailViewModel).vx9 = function () {
    Companion_getInstance_126();
    var tmp0_safe_receiver = this.y10z_1.t2().a110_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vho_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    this.lqp_1.wp8('SiteEdit', mapOf_0(to('entityUid', tmp2_elvis_lhs == null ? '-1' : tmp2_elvis_lhs)));
  };
  protoOf(SiteDetailViewModel).l112 = function (termsAndLang) {
    var tmp0_elvis_lhs = termsAndLang.zkb_1.khu_1;
    this.lqp_1.wp8('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.a110_1 = site;
    this.b110_1 = siteTerms;
  }
  protoOf(SiteDetailUiState).m112 = function (site, siteTerms) {
    return new SiteDetailUiState(site, siteTerms);
  };
  protoOf(SiteDetailUiState).c110 = function (site, siteTerms, $super) {
    site = site === VOID ? this.a110_1 : site;
    siteTerms = siteTerms === VOID ? this.b110_1 : siteTerms;
    return $super === VOID ? this.m112(site, siteTerms) : $super.m112.call(this, site, siteTerms);
  };
  protoOf(SiteDetailUiState).toString = function () {
    return 'SiteDetailUiState(site=' + this.a110_1 + ', siteTerms=' + this.b110_1 + ')';
  };
  protoOf(SiteDetailUiState).hashCode = function () {
    var result = this.a110_1 == null ? 0 : hashCode(this.a110_1);
    result = imul(result, 31) + hashCode(this.b110_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.a110_1, tmp0_other_with_cast.a110_1))
      return false;
    if (!equals(this.b110_1, tmp0_other_with_cast.b110_1))
      return false;
    return true;
  };
  function SiteEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.v112_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda$slambda).zqc = function (it, $completion) {
    var tmp = this.aqd(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.zqc(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.w112_1.gqc_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.v112_1.y113(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).aqd = function (it, completion) {
    var i = new SiteEditViewModel$slambda$slambda$slambda(this.v112_1, completion);
    i.w112_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.zqc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda).i114 = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.i114(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.h114_1.v7e().qho(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).jo1 = function (db, completion) {
    var i = new SiteEditViewModel$slambda$slambda(completion);
    i.h114_1 = db;
    return i;
  };
  function SiteEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda(resultContinuation);
    var l = function (db, $completion) {
      return i.i114(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_1).yhq = 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.yhq($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.yhq($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.u113_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.z114(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SiteEditViewModel$slambda$slambda_3($supportedLangCodes, resultContinuation) {
    this.i115_1 = $supportedLangCodes;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_3).k115 = function (it, $completion) {
    var tmp = this.jo1(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.k115(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.j115_1.w7e().lht(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.i115_1, element.khu_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.khu_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.i115_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.khu_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).jo1 = function (it, completion) {
    var i = new SiteEditViewModel$slambda$slambda_3(this.i115_1, completion);
    i.j115_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.k115(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_5).t115 = 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.t115($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.t115($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.u113_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.z114(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.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function SiteEditViewModel$slambda$slambda_7(this$0, resultContinuation) {
    this.c116_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.c116_1.nqq(this.c116_1.gqq(), 'siteTermsHtml');
            var tmp_1 = SiteEditViewModel$slambda$slambda$slambda_0(this.c116_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.c116_1, completion);
    i.d116_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.jhu_1;
      var this_0 = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
      // Inline function 'kotlin.contracts.contract' call
      tmp.mhu_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.w113_1;
    languagesConfig$factory_2();
    return this_0.t2();
  }
  function Companion_201() {
    this.e116_1 = 'SiteEdit';
    this.f116_1 = 'siteTermsLang';
    this.g116_1 = 'termsList';
    this.h116_1 = 'siteTermsHtml';
  }
  var Companion_instance_250;
  function Companion_getInstance_218() {
    return Companion_instance_250;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_40(function_0) {
    this.i116_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_40).t1d = function (value, $completion) {
    return this.i116_1(value, $completion);
  };
  function SiteEditViewModel$slambda(this$0, resultContinuation) {
    this.r116_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda).hsg = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda).he = function (p1, $completion) {
    return this.hsg(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.s116_1.p7f();
            var tmp_1 = this.r116_1.bqq();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.yi1(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).jo1 = function (db, completion) {
    var i = new SiteEditViewModel$slambda(this.r116_1, completion);
    i.s116_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.hsg(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.u113_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.z114(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.b117_1 = this$0;
    this.c117_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.b117_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, SiteEditViewModel$slambda$lambda(this.b117_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.c117_1, null);
            var tmp_6 = SiteEditViewModel$slambda$slambda_6(null);
            suspendResult = this.b117_1.sqq(tmp_3, tmp_4, 'termsList', tmp_5, tmp_6, SiteEditViewModel$slambda$lambda_0(this.b117_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            l$ret$1: do {
              var this_0 = this.b117_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_7 = this.b117_1.jqq().vol(strings_getInstance().on4_1);
                var nextValue = prevValue.vq8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_7, VOID, SiteEditViewModel$onClickSave$ref(this.b117_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.d117_1, VOID, VOID, SiteEditViewModel$slambda$slambda_8(this.b117_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.b117_1, this.c117_1, completion);
    i.d117_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.jhu_1 = $html;
      return Unit_instance;
    };
  }
  function SiteEditViewModel$onChangeTermsHtml$lambda_0($prev) {
    return function (it) {
      return it.khu_1 === $prev.x114_1.qq6_1;
    };
  }
  function SiteEditViewModel$onChangeTermsHtml$slambda(this$0, $newTerms, resultContinuation) {
    this.m117_1 = this$0;
    this.n117_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.m117_1.pqq(this.m117_1.jqp_1, 'termsList', ListSerializer(Companion_instance_47.n4r()), this.n117_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.m117_1, this.n117_1, completion);
    i.o117_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.x117_1 = $commitDelay;
    this.y117_1 = $entity;
    this.z117_1 = $this;
    this.a118_1 = $key;
    this.b118_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.x117_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.y117_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.z117_1.pqq(this.z117_1.jqp_1, this.a118_1, this.b118_1, this.y117_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.x117_1, this.y117_1, this.z117_1, this.a118_1, this.b118_1, completion);
    i.c118_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.l118_1 = this$0;
    this.m118_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.l118_1.fqq().v7e().sho(this.m118_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.l118_1.fqq().w7e();
            var this_0 = this.l118_1.u113_1.t2().s114_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.jhu_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.ihu_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.mht(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.l118_1.tqv('Community', this.m118_1.vho_1, this.m118_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.l118_1, this.m118_1, completion);
    i.n118_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.u113_1 = MutableStateFlow(new SiteEditUiState());
    this.v113_1 = asStateFlow(this.u113_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.w113_1 = Instance(this, tmp$ret$0, null).a5d(this, languagesConfig$factory_1());
    this.x113_1 = null;
    var supportedLangs = _get_languagesConfig__hebcss_0(this).qpo_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.qq6_1;
      destination.i1(tmp$ret$2);
    }
    var supportedLangCodes = destination;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>' call
        var tmp0_title = this.jqq().vol(strings_getInstance().jnb_1);
        var nextValue = prevValue.vq8(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.u113_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.qq6_1 === (tmp0_elvis_lhs == null ? _get_languagesConfig__hebcss_0(this).spo_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.z114(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.uqq(tmp_1, true, tmp_2, SiteEditViewModel$slambda_2(this, supportedLangCodes, null));
  }
  protoOf(SiteEditViewModel).o118 = function (uiLang) {
    this.jqp_1.mql('siteTermsLang', uiLang.qq6_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.u113_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onChangeTermsLanguage.<anonymous>' call
        var nextValue = prevValue.z114(VOID, VOID, VOID, VOID, VOID, VOID, uiLang);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SiteEditViewModel).y113 = function (html) {
    var tmp0_elvis_lhs = this.u113_1.t2().p118();
    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.u113_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.z114(VOID, replace_0(prevValue.s114_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.s114_1;
    var tmp1_safe_receiver = this.x113_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_1 = this;
    var tmp_2 = this.aqq();
    tmp_1.x113_1 = launch(tmp_2, VOID, VOID, SiteEditViewModel$onChangeTermsHtml$slambda_0(this, newTerms, null));
  };
  protoOf(SiteEditViewModel).q118 = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.u113_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.r114_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ahp_1;
        var tmp_0 = this.uqw(tmp, entity == null ? null : entity.ahp_1, prevValue.v114_1);
        var tmp2_safe_receiver = prevValue.r114_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.chp_1;
        var nextValue = prevValue.z114(entity, VOID, VOID, VOID, tmp_0, this.uqw(tmp_1, entity == null ? null : entity.chp_1, prevValue.w114_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_126();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qqv_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.aqq();
    tmp_2.qqv_1 = launch(tmp_3, VOID, VOID, SiteEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SiteEditViewModel).vsd = function () {
    var tmp0_elvis_lhs = this.u113_1.t2().r114_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.ahp_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.u113_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.z114(VOID, VOID, VOID, VOID, this.jqq().vol(strings_getInstance().gnn_1));
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    // Inline function 'kotlin.collections.map' call
    var this_2 = this.u113_1.t2().s114_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.khu_1;
      var tmp_0 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
      var tmp0_safe_receiver = item.jhu_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.chp_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.u113_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.z114(VOID, VOID, VOID, VOID, VOID, this.jqq().vol(strings_getInstance().rnn_1));
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_2;
          }
        }
      }
    }
    if (this.u113_1.t2().y114_1)
      return Unit_instance;
    var tmp_2 = this.aqq();
    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.r114_1 = site;
    this.s114_1 = siteTerms;
    this.t114_1 = uiLangs;
    this.u114_1 = fieldsEnabled;
    this.v114_1 = siteNameError;
    this.w114_1 = registrationEnabledError;
    this.x114_1 = currentSiteTermsLang;
    this.y114_1 = !(this.v114_1 == null) ? true : !(this.w114_1 == null);
  }
  protoOf(SiteEditUiState).p118 = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.s114_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.khu_1 === this.x114_1.qq6_1) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    return tmp$ret$1;
  };
  protoOf(SiteEditUiState).r118 = function () {
    var tmp0_safe_receiver = this.p118();
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.jhu_1;
  };
  protoOf(SiteEditUiState).s118 = function (site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) {
    return new SiteEditUiState(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang);
  };
  protoOf(SiteEditUiState).z114 = function (site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang, $super) {
    site = site === VOID ? this.r114_1 : site;
    siteTerms = siteTerms === VOID ? this.s114_1 : siteTerms;
    uiLangs = uiLangs === VOID ? this.t114_1 : uiLangs;
    fieldsEnabled = fieldsEnabled === VOID ? this.u114_1 : fieldsEnabled;
    siteNameError = siteNameError === VOID ? this.v114_1 : siteNameError;
    registrationEnabledError = registrationEnabledError === VOID ? this.w114_1 : registrationEnabledError;
    currentSiteTermsLang = currentSiteTermsLang === VOID ? this.x114_1 : currentSiteTermsLang;
    return $super === VOID ? this.s118(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) : $super.s118.call(this, site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang);
  };
  protoOf(SiteEditUiState).toString = function () {
    return 'SiteEditUiState(site=' + this.r114_1 + ', siteTerms=' + this.s114_1 + ', uiLangs=' + this.t114_1 + ', fieldsEnabled=' + this.u114_1 + ', siteNameError=' + this.v114_1 + ', registrationEnabledError=' + this.w114_1 + ', currentSiteTermsLang=' + this.x114_1 + ')';
  };
  protoOf(SiteEditUiState).hashCode = function () {
    var result = this.r114_1 == null ? 0 : hashCode(this.r114_1);
    result = imul(result, 31) + hashCode(this.s114_1) | 0;
    result = imul(result, 31) + hashCode(this.t114_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.u114_1) | 0;
    result = imul(result, 31) + (this.v114_1 == null ? 0 : getStringHashCode(this.v114_1)) | 0;
    result = imul(result, 31) + (this.w114_1 == null ? 0 : getStringHashCode(this.w114_1)) | 0;
    result = imul(result, 31) + this.x114_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.r114_1, tmp0_other_with_cast.r114_1))
      return false;
    if (!equals(this.s114_1, tmp0_other_with_cast.s114_1))
      return false;
    if (!equals(this.t114_1, tmp0_other_with_cast.t114_1))
      return false;
    if (!(this.u114_1 === tmp0_other_with_cast.u114_1))
      return false;
    if (!(this.v114_1 == tmp0_other_with_cast.v114_1))
      return false;
    if (!(this.w114_1 == tmp0_other_with_cast.w114_1))
      return false;
    if (!this.x114_1.equals(tmp0_other_with_cast.x114_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_202() {
    this.t118_1 = 'locale';
    this.u118_1 = 'Terms';
  }
  var Companion_instance_251;
  function Companion_getInstance_219() {
    return Companion_instance_251;
  }
  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.d119_1 = $acceptButtonMode;
    this.e119_1 = $apiUrl;
    this.f119_1 = $di;
    this.g119_1 = $learningSpace;
    this.h119_1 = this$0;
    this.i119_1 = $savedStateHandle;
    this.j119_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.d119_1 ? !(this.e119_1 == null) : false) {
              var this_0 = get_direct(this.f119_1);
              var context = this.g119_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).bk4();
            } else {
              tmp_1 = this.h119_1.fqq();
            }

            tmp_0.l119_1 = tmp_1;
            this.m119_1 = this.i119_1.ba('locale');
            this.n119_1 = this.m119_1;
            if (this.n119_1 == null) {
              this.hd_1 = 1;
              suspendResult = _init_$lambda(this.j119_1).vpo(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.o119_1 = this.n119_1;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.o119_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.p119_1 = this.o119_1;
            this.hd_1 = 3;
            suspendResult = this.l119_1.w7e().oht(this.p119_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.h119_1.m11a_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.r11a(displayTerms, this.d119_1);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            } else {
              l$ret$3: do {
                var this_2 = this.h119_1.m11a_1;
                while (true) {
                  var prevValue_0 = this_2.t2();
                  var nextValue_0 = prevValue_0.r11a(VOID, VOID, this.h119_1.jqq().vol(strings_getInstance().hmk_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.d119_1, this.e119_1, this.f119_1, this.g119_1, this.h119_1, this.i119_1, this.j119_1, completion);
    i.k119_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.m11a_1 = MutableStateFlow(new SiteTermsDetailUiState());
    this.n11a_1 = asStateFlow(this.m11a_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_117();
    var apiUrl = savedStateHandle.ba('learningSpaceUrl');
    var tmp;
    if (acceptButtonMode ? !(apiUrl == null) : false) {
      tmp = new LearningSpace(apiUrl);
    } else {
      tmp = this.zqp().voc();
    }
    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.nqp_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.jqq().vol(strings_getInstance().dnb_1);
        var nextValue = prevValue.vq8(VOID, VOID, tmp1_title, tmp0_navigationVisible, true, VOID, false);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.aqq();
    launch(tmp_3, VOID, VOID, SiteTermsDetailViewModel$slambda_0(acceptButtonMode, apiUrl, di, learningSpace, this, savedStateHandle, getLocaleForSiteTermsUseCase$delegate, null));
  }
  protoOf(SiteTermsDetailViewModel).s11a = function () {
    Companion_getInstance_215();
    // 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.xqq(this_0, Companion_getInstance_215().vr9_1);
    Companion_getInstance_126();
    this.wqq(this_0, 'next');
    var tmp$ret$2 = this_0.f3();
    this.lqp_1.wp8('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.o11a_1 = siteTerms;
    this.p11a_1 = acceptButtonVisible;
    this.q11a_1 = error;
  }
  protoOf(SiteTermsDetailUiState).t11a = function (siteTerms, acceptButtonVisible, error) {
    return new SiteTermsDetailUiState(siteTerms, acceptButtonVisible, error);
  };
  protoOf(SiteTermsDetailUiState).r11a = function (siteTerms, acceptButtonVisible, error, $super) {
    siteTerms = siteTerms === VOID ? this.o11a_1 : siteTerms;
    acceptButtonVisible = acceptButtonVisible === VOID ? this.p11a_1 : acceptButtonVisible;
    error = error === VOID ? this.q11a_1 : error;
    return $super === VOID ? this.t11a(siteTerms, acceptButtonVisible, error) : $super.t11a.call(this, siteTerms, acceptButtonVisible, error);
  };
  protoOf(SiteTermsDetailUiState).toString = function () {
    return 'SiteTermsDetailUiState(siteTerms=' + this.o11a_1 + ', acceptButtonVisible=' + this.p11a_1 + ', error=' + this.q11a_1 + ')';
  };
  protoOf(SiteTermsDetailUiState).hashCode = function () {
    var result = this.o11a_1 == null ? 0 : hashCode(this.o11a_1);
    result = imul(result, 31) + getBooleanHashCode(this.p11a_1) | 0;
    result = imul(result, 31) + (this.q11a_1 == null ? 0 : getStringHashCode(this.q11a_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.o11a_1, tmp0_other_with_cast.o11a_1))
      return false;
    if (!(this.p11a_1 === tmp0_other_with_cast.p11a_1))
      return false;
    if (!(this.q11a_1 == tmp0_other_with_cast.q11a_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.r11b_1;
    httpClient$factory_12();
    return this_0.t2();
  }
  function _get_impl__d88w17_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.s11b_1;
    impl$factory_6();
    return this_0.t2();
  }
  function Companion_203() {
    Companion_instance_252 = this;
    this.t11b_1 = 'LearningSpaceEnterLink';
    var tmp = this;
    Companion_getInstance_126();
    Companion_getInstance_117();
    Companion_getInstance_126();
    tmp.u11b_1 = listOf(['next', 'intMsg', 'noSessionChange']);
    this.v11b_1 = 'stateUrl';
  }
  var Companion_instance_252;
  function Companion_getInstance_220() {
    if (Companion_instance_252 == null)
      new Companion_203();
    return Companion_instance_252;
  }
  function LearningSpaceEnterLinkViewModel$onClickNext$slambda(this$0, $endpointUrl, $viewName, resultContinuation) {
    this.e11c_1 = this$0;
    this.f11c_1 = $endpointUrl;
    this.g11c_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.e11c_1), this.f11c_1, VOID, this.e11c_1.m4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var site = suspendResult;
            Companion_getInstance_117();
            var tmp_0 = to('learningSpaceUrl', this.f11c_1);
            Companion_getInstance_117();
            var this_0 = this.e11c_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_220().u11b_1.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              this.e11c_1.wqq(args, element);
            }

            this.e11c_1.lqq(Companion_getInstance_98().dq9_1);
            l$ret$1: do {
              var this_3 = this.e11c_1.p11b_1;
              while (true) {
                var prevValue = this_3.t2();
                var nextValue = prevValue.n11c(VOID, true, VOID, null, true);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp_1;
            if (equals(this.g11c_1, 'RegisterAgeRedirect')) {
              tmp_1 = !site.chp_1;
            } else {
              tmp_1 = false;
            }

            if (tmp_1) {
              this.e11c_1.lqq(Companion_getInstance_98().dq9_1);
              l$ret$3: do {
                var this_4 = this.e11c_1.p11b_1;
                while (true) {
                  var prevValue_0 = this_4.t2();
                  this.e11c_1.lqq(Companion_getInstance_98().dq9_1);
                  var tmp0_linkError = _get_impl__d88w17_2(this.e11c_1).vol(strings_getInstance().ans_1);
                  var nextValue_0 = prevValue_0.n11c(VOID, true, VOID, tmp0_linkError, true);
                  if (this_4.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              return Unit_instance;
            }

            this.e11c_1.lqp_1.wp8(this.g11c_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.f11c_1));
              l$ret$5: do {
                var this_5 = this.e11c_1.p11b_1;
                while (true) {
                  var prevValue_1 = this_5.t2();
                  this.e11c_1.lqq(Companion_getInstance_98().dq9_1);
                  var tmp0_linkError_0 = _get_impl__d88w17_2(this.e11c_1).vol(strings_getInstance().emv_1);
                  var nextValue_1 = prevValue_1.n11c(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.e11c_1, this.f11c_1, this.g11c_1, completion);
    i.h11c_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_220();
    UstadViewModel.call(this, di, savedStateHandle, 'LearningSpaceEnterLink');
    this.p11b_1 = MutableStateFlow(new LearningSpaceEnterLinkUiState());
    this.q11b_1 = asStateFlow(this.p11b_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.r11b_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.s11b_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.nqp_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).vol(strings_getInstance().bne_1);
        var nextValue = prevValue.vq8(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.p11b_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_220().v11b_1);
        var nextValue_0 = prevValue_0.n11c(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(LearningSpaceEnterLinkViewModel).jwo = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.p11b_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.onClickNext.<anonymous>' call
        var nextValue = prevValue.n11c(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp;
    Companion_getInstance_215();
    if (this.jqp_1.ba('newOrExisting') === 'new') {
      tmp = 'RegisterAgeRedirect';
    } else {
      tmp = 'Login';
    }
    var viewName = tmp;
    this.lqq(Companion_getInstance_98().cq9_1);
    var endpointUrl = requirePostfix(requireHttpPrefix(this.p11b_1.t2().i11c_1), '/');
    var tmp_0 = this.aqq();
    launch(tmp_0, VOID, VOID, LearningSpaceEnterLinkViewModel$onClickNext$slambda_0(this, endpointUrl, viewName, null));
  };
  protoOf(LearningSpaceEnterLinkViewModel).o11c = function (siteLink) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.p11b_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.onSiteLinkUpdated.<anonymous>' call
        var nextValue = prevValue.n11c(siteLink);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.jqp_1.mql(Companion_getInstance_220().v11b_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.i11c_1 = siteLink;
    this.j11c_1 = validLink;
    this.k11c_1 = progressVisible;
    this.l11c_1 = linkError;
    this.m11c_1 = fieldsEnabled;
  }
  protoOf(LearningSpaceEnterLinkUiState).p11c = function (siteLink, validLink, progressVisible, linkError, fieldsEnabled) {
    return new LearningSpaceEnterLinkUiState(siteLink, validLink, progressVisible, linkError, fieldsEnabled);
  };
  protoOf(LearningSpaceEnterLinkUiState).n11c = function (siteLink, validLink, progressVisible, linkError, fieldsEnabled, $super) {
    siteLink = siteLink === VOID ? this.i11c_1 : siteLink;
    validLink = validLink === VOID ? this.j11c_1 : validLink;
    progressVisible = progressVisible === VOID ? this.k11c_1 : progressVisible;
    linkError = linkError === VOID ? this.l11c_1 : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? this.m11c_1 : fieldsEnabled;
    return $super === VOID ? this.p11c(siteLink, validLink, progressVisible, linkError, fieldsEnabled) : $super.p11c.call(this, siteLink, validLink, progressVisible, linkError, fieldsEnabled);
  };
  protoOf(LearningSpaceEnterLinkUiState).toString = function () {
    return 'LearningSpaceEnterLinkUiState(siteLink=' + this.i11c_1 + ', validLink=' + this.j11c_1 + ', progressVisible=' + this.k11c_1 + ', linkError=' + this.l11c_1 + ', fieldsEnabled=' + this.m11c_1 + ')';
  };
  protoOf(LearningSpaceEnterLinkUiState).hashCode = function () {
    var result = getStringHashCode(this.i11c_1);
    result = imul(result, 31) + getBooleanHashCode(this.j11c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.k11c_1) | 0;
    result = imul(result, 31) + (this.l11c_1 == null ? 0 : getStringHashCode(this.l11c_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.m11c_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.i11c_1 === tmp0_other_with_cast.i11c_1))
      return false;
    if (!(this.j11c_1 === tmp0_other_with_cast.j11c_1))
      return false;
    if (!(this.k11c_1 === tmp0_other_with_cast.k11c_1))
      return false;
    if (!(this.l11c_1 == tmp0_other_with_cast.l11c_1))
      return false;
    if (!(this.m11c_1 === tmp0_other_with_cast.m11c_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().nnp_1;
    PermissionFlags_getInstance();
    var tmp_1 = to(tmp_0, new Long(1024, 0));
    var tmp_2 = strings_getInstance().onp_1;
    PermissionFlags_getInstance();
    var tmp_3 = to(tmp_2, new Long(8192, 0));
    var tmp_4 = strings_getInstance().pnp_1;
    PermissionFlags_getInstance();
    var tmp_5 = to(tmp_4, new Long(32768, 0));
    var tmp_6 = strings_getInstance().unp_1;
    PermissionFlags_getInstance();
    var tmp_7 = to(tmp_6, new Long(131072, 0));
    var tmp_8 = strings_getInstance().tnp_1;
    PermissionFlags_getInstance();
    var tmp_9 = to(tmp_8, new Long(4096, 0));
    var tmp_10 = strings_getInstance().snp_1;
    PermissionFlags_getInstance();
    var tmp_11 = to(tmp_10, new Long(512, 0));
    var tmp_12 = strings_getInstance().gnp_1;
    PermissionFlags_getInstance();
    var tmp_13 = to(tmp_12, new Long(1, 0));
    var tmp_14 = strings_getInstance().hnp_1;
    PermissionFlags_getInstance();
    var tmp_15 = to(tmp_14, new Long(2, 0));
    var tmp_16 = strings_getInstance().inp_1;
    PermissionFlags_getInstance();
    var tmp_17 = to(tmp_16, new Long(4, 0));
    var tmp_18 = strings_getInstance().dnp_1;
    PermissionFlags_getInstance();
    var tmp_19 = to(tmp_18, new Long(2048, 0));
    var tmp_20 = strings_getInstance().jnp_1;
    PermissionFlags_getInstance();
    var tmp_21 = to(tmp_20, new Long(8, 0));
    var tmp_22 = strings_getInstance().knp_1;
    PermissionFlags_getInstance();
    var tmp_23 = to(tmp_22, new Long(16, 0));
    var tmp_24 = strings_getInstance().lnp_1;
    PermissionFlags_getInstance();
    var tmp_25 = to(tmp_24, new Long(32, 0));
    var tmp_26 = strings_getInstance().mnp_1;
    PermissionFlags_getInstance();
    var tmp_27 = to(tmp_26, new Long(64, 0));
    var tmp_28 = strings_getInstance().qnp_1;
    PermissionFlags_getInstance();
    var tmp_29 = to(tmp_28, new Long(128, 0));
    var tmp_30 = strings_getInstance().rnp_1;
    PermissionFlags_getInstance();
    tmp.q11c_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.zi1(accountPersonUid, new Long(-1, 2147483647));
    }
    return tmp;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).b11d = function (entity, hasViewPermission, $completion) {
    var tmp = this.c11d(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.b11d(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.z11c_1;
          var tmp_0;
          if (this.a11d_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).c11d = function (entity, hasViewPermission, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.z11c_1 = entity;
    i.a11d_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.b11d(entity, hasViewPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.l11d_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).n11d = function (it, $completion) {
    var tmp = this.o11d(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.n11d((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.l11d_1.m11e_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (!(this.m11d_1 == null)) {
                  tmp_0 = SystemPermissionConstants_getInstance().q11c_1;
                } else {
                  tmp_0 = emptyList();
                }
                var nextValue = prevValue.q11e(this.m11d_1, tmp_0);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            if (!(this.m11d_1 == null)) {
              this.hd_1 = 1;
              suspendResult = this.l11d_1.fqq().n7d().rg4(this.l11d_1.l11e_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.l11d_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = title == null ? null : title.toString();
                var nextValue_0 = prevValue_0.vq8(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).o11d = function (it, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this.l11d_1, completion);
    i.m11d_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.n11d(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.z11e_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).uqh = function (hasEditPermission, $completion) {
    var tmp = this.vqh(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.uqh((!(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.z11e_1.nqp_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vq8(prevValue.gq8_1.bq9(this.a11f_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).vqh = function (hasEditPermission, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this.z11e_1, completion);
    i.a11f_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.uqh(hasEditPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $viewPermissionFlow, this$0, resultContinuation) {
    this.j11f_1 = $entityFlow;
    this.k11f_1 = $viewPermissionFlow;
    this.l11f_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.j11f_1, this.k11f_1, SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            suspendResult = collectLatest(tmp_0, SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this.l11f_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.j11f_1, this.k11f_1, this.l11f_1, completion);
    i.m11f_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.v11f_1 = $editPermissionFlow;
    this.w11f_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.w11f_1, null);
            suspendResult = this.v11f_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.v11f_1, this.w11f_1, completion);
    i.x11f_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.g11g_1 = $this_launch;
    this.h11g_1 = $entityFlow;
    this.i11g_1 = $viewPermissionFlow;
    this.j11g_1 = this$0;
    this.k11g_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.g11g_1, VOID, VOID, SystemPermissionDetailViewModel$slambda$slambda$slambda_0(this.h11g_1, this.i11g_1, this.j11g_1, null));
          launch(this.g11g_1, VOID, VOID, SystemPermissionDetailViewModel$slambda$slambda$slambda_2(this.k11g_1, this.j11g_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.g11g_1, this.h11g_1, this.i11g_1, this.j11g_1, this.k11g_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_126();
    $this.wqq(this_0, 'personUid');
    var tmp$ret$2 = this_0.f3();
    $this.lqp_1.wp8('SystemPermissionEdit', tmp$ret$2);
  }
  function Companion_204() {
    this.l11g_1 = 'SystemPermission';
  }
  var Companion_instance_253;
  function Companion_getInstance_221() {
    return Companion_instance_253;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_41(function_0) {
    this.m11g_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_41).t1d = function (value, $completion) {
    return this.m11g_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.v11g_1 = this$0;
    this.w11g_1 = $entityFlow;
    this.x11g_1 = $viewPermissionFlow;
    this.y11g_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.v11g_1.m11e_1, SystemPermissionDetailViewModel$slambda$slambda_0(this.z11g_1, this.w11g_1, this.x11g_1, this.v11g_1, this.y11g_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.v11g_1, this.w11g_1, this.x11g_1, this.y11g_1, completion);
    i.z11g_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_126();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.l11e_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.m11e_1 = MutableStateFlow(new SystemPermissionDetailUiState());
    this.n11e_1 = asStateFlow(this.m11e_1);
    var entityFlow = this.fqq().p7f().wi1(this.l11e_1);
    var viewPermissionFlow = personHasSystemPermissionAsFlowForUser(this.fqq().p7f(), this.bqq(), this.l11e_1);
    var tmp_0 = this.fqq().p7f();
    var tmp_1 = this.bqq();
    PermissionFlags_getInstance();
    var editPermissionFlow = tmp_0.zi1(tmp_1, new Long(4096, 0));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.detail.SystemPermissionDetailViewModel.<anonymous>' call
        var tmp0_text = this.jqq().vol(strings_getInstance().amx_1);
        var tmp1_onClick = SystemPermissionDetailViewModel$onClickEdit$ref(this);
        var tmp2_icon = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.vq8(new FabUiState(VOID, tmp0_text, tmp2_icon, tmp1_onClick));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.aqq();
    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.o11e_1 = systemPermission;
    this.p11e_1 = permissionLabels;
  }
  protoOf(SystemPermissionDetailUiState).q11e = function (systemPermission, permissionLabels) {
    return new SystemPermissionDetailUiState(systemPermission, permissionLabels);
  };
  protoOf(SystemPermissionDetailUiState).toString = function () {
    return 'SystemPermissionDetailUiState(systemPermission=' + this.o11e_1 + ', permissionLabels=' + this.p11e_1 + ')';
  };
  protoOf(SystemPermissionDetailUiState).hashCode = function () {
    var result = this.o11e_1 == null ? 0 : this.o11e_1.hashCode();
    result = imul(result, 31) + hashCode(this.p11e_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.o11e_1, tmp0_other_with_cast.o11e_1))
      return false;
    if (!equals(this.p11e_1, tmp0_other_with_cast.p11e_1))
      return false;
    return true;
  };
  function SystemPermissionEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.i11h_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda$slambda).k11h = function (db, $completion) {
    var tmp = this.jo1(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.k11h(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.j11h_1.p7f().xi1(this.i11h_1.k11i_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).jo1 = function (db, completion) {
    var i = new SystemPermissionEditViewModel$slambda$slambda(this.i11h_1, completion);
    i.j11h_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.k11h(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).ji5 = 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.ji5($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.ji5($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.i11i_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().q11c_1;
          } else {
            tmp = emptyList();
          }
          var nextValue = prevValue.w11i(it, VOID, tmp);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.vsd();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function SystemPermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.f11j_1 = this$0;
    this.g11j_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(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.io1(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.f11j_1.fqq().p7f().di2(this.g11j_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).jo1 = function (it, completion) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda$slambda(this.f11j_1, this.g11j_1, completion);
    i.h11j_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_205() {
    this.i11j_1 = 'SystemPermissionEdit';
  }
  var Companion_instance_254;
  function Companion_getInstance_222() {
    return Companion_instance_254;
  }
  function SystemPermissionEditViewModel$slambda(this$0, resultContinuation) {
    this.r11j_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda).hsg = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda).he = function (p1, $completion) {
    return this.hsg(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.r11j_1.fqq().p7f();
            var tmp_1 = this.r11j_1.bqq();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.yi1(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).jo1 = function (it, completion) {
    var i = new SystemPermissionEditViewModel$slambda(this.r11j_1, completion);
    i.s11j_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.hsg(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.i11i_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.w11i(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$slambda_1(this$0, resultContinuation) {
    this.b11k_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.b11k_1, null);
            var tmp_2 = SystemPermissionEditViewModel$slambda$slambda_2(null);
            suspendResult = this.b11k_1.tqq(tmp_0, VOID, VOID, tmp_1, tmp_2, SystemPermissionEditViewModel$slambda$lambda(this.b11k_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.b11k_1.nqp_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.b11k_1.jqq().vol(strings_getInstance().on4_1);
                var nextValue = prevValue.vq8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, SystemPermissionEditViewModel$onClickSave$ref(this.b11k_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            suspendResult = this.b11k_1.fqq().n7d().rg4(this.b11k_1.k11i_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var title = suspendResult;
            l$ret$3: do {
              var this_1 = this.b11k_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = title == null ? null : title.toString();
                var nextValue_0 = prevValue_0.vq8(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.b11k_1, completion);
    i.c11k_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.i11i_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.w11i(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.l11k_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.l11k_1.i11i_1.t2().t11i_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.m11k_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = this.l11k_1.fqq();
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, SystemPermissionEditViewModel$onClickSave$slambda$slambda_0(this.l11k_1, this.m11k_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_117();
            this.l11k_1.lqp_1.vqb('', 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.l11k_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.i11i_1 = MutableStateFlow(new SystemPermissionEditUiState());
    this.j11i_1 = asStateFlow(this.i11i_1);
    var tmp = this;
    Companion_getInstance_126();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.k11i_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.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(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.vqq(tmp_0, VOID, tmp_1, SystemPermissionEditViewModel$slambda_2(this, null));
  }
  protoOf(SystemPermissionEditViewModel).vta = function (flag) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.i11i_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.t11i_1;
        var nextValue = prevValue.w11i(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ikz(VOID, VOID, VOID, toggleFlag(prevValue.t11i_1.vi2_1, flag)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SystemPermissionEditViewModel).vsd = function () {
    var tmp = SystemPermissionEditViewModel$onClickSave$lambda(this);
    this.wqw(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.t11i_1 = entity;
    this.u11i_1 = fieldsEnabled;
    this.v11i_1 = permissionLabels;
  }
  protoOf(SystemPermissionEditUiState).n11k = function (entity, fieldsEnabled, permissionLabels) {
    return new SystemPermissionEditUiState(entity, fieldsEnabled, permissionLabels);
  };
  protoOf(SystemPermissionEditUiState).w11i = function (entity, fieldsEnabled, permissionLabels, $super) {
    entity = entity === VOID ? this.t11i_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.u11i_1 : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? this.v11i_1 : permissionLabels;
    return $super === VOID ? this.n11k(entity, fieldsEnabled, permissionLabels) : $super.n11k.call(this, entity, fieldsEnabled, permissionLabels);
  };
  protoOf(SystemPermissionEditUiState).toString = function () {
    return 'SystemPermissionEditUiState(entity=' + this.t11i_1 + ', fieldsEnabled=' + this.u11i_1 + ', permissionLabels=' + this.v11i_1 + ')';
  };
  protoOf(SystemPermissionEditUiState).hashCode = function () {
    var result = this.t11i_1 == null ? 0 : this.t11i_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.u11i_1) | 0;
    result = imul(result, 31) + hashCode(this.v11i_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.t11i_1, tmp0_other_with_cast.t11i_1))
      return false;
    if (!(this.u11i_1 === tmp0_other_with_cast.u11i_1))
      return false;
    if (!equals(this.v11i_1, tmp0_other_with_cast.v11i_1))
      return false;
    return true;
  };
  function TimeZoneListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.w11k_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$slambda$slambda).y11k = 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.y11k((!(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.w11k_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.w11k_1, completion);
    i.x11k_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.y11k($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda($searchText, this$0, resultContinuation) {
    this.h11l_1 = $searchText;
    this.i11l_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).y11k = 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.y11k((!(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.h11l_1;
          var searchWords = Regex_init_$Create$('\\s+').y9(this_0, 0);
          var this_1 = _get_allTimeZones__4t4mtu(this.i11l_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.fmi(), 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.h11l_1, this.i11l_1, completion);
    i.j11l_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.y11k($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_allTimeZones__4t4mtu($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.k11m_1;
    allTimeZones$factory();
    return this_0.t2();
  }
  function Companion_206() {
    this.m11m_1 = 'TimeZoneList';
  }
  var Companion_instance_255;
  function Companion_getInstance_223() {
    return Companion_instance_255;
  }
  function sam$kotlin_Comparator$0_3(function_0) {
    this.n11m_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_3).pa = function (a, b) {
    return this.n11m_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.fmf();
    // Inline function 'kotlin.collections.sortedBy' call
    // Inline function 'kotlin.collections.map' call
    var this_0 = Companion_getInstance_9().fmj();
    // 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().cmi(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).jmj();
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp$ret$1 = offsetAt(b, $now).jmj();
      return compareValues(tmp, tmp$ret$1);
    };
  }
  function TimeZoneListViewModel$slambda(this$0, resultContinuation) {
    this.w11m_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.w11m_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.w11m_1.eqy_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.z11m(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.w11m_1, completion);
    i.x11m_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.i11n_1 = this$0;
    this.j11n_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.j11n_1, this.i11n_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.i11n_1.eqy_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.z11m(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.i11n_1, this.j11n_1, completion);
    i.k11n_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.k11m_1 = lazy_0(TimeZoneListViewModel$allTimeZones$delegate$lambda);
    this.l11m_1 = null;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, this.jqq().vol(strings_getInstance().sn4_1), VOID, VOID, VOID, VOID, this.nqz());
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.aqq();
    launch(tmp_0, VOID, VOID, TimeZoneListViewModel$slambda_0(this, null));
  }
  protoOf(TimeZoneListViewModel).yqy = function (searchText) {
    var tmp0_safe_receiver = this.l11m_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.aqq();
    tmp.l11m_1 = launch(tmp_0, VOID, VOID, TimeZoneListViewModel$onUpdateSearchResult$slambda_0(this, searchText, null));
  };
  protoOf(TimeZoneListViewModel).l11n = function (entry) {
    this.uqv(entry.fmi());
  };
  protoOf(TimeZoneListViewModel).zqy = function () {
  };
  function TimezoneListUiState(timeZoneList) {
    timeZoneList = timeZoneList === VOID ? emptyList() : timeZoneList;
    this.y11m_1 = timeZoneList;
  }
  protoOf(TimezoneListUiState).z11m = function (timeZoneList) {
    return new TimezoneListUiState(timeZoneList);
  };
  protoOf(TimezoneListUiState).toString = function () {
    return 'TimezoneListUiState(timeZoneList=' + this.y11m_1 + ')';
  };
  protoOf(TimezoneListUiState).hashCode = function () {
    return hashCode(this.y11m_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.y11m_1, tmp0_other_with_cast.y11m_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.u11n_1 = this$0;
    this.v11n_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.x11n_1 = this.u11n_1.m4r();
            var tmp_1 = this;
            tmp_1.y11n_1 = _get_httpClient__2ty1zc_6(this.u11n_1);
            var tmp_2 = this;
            tmp_2.z11n_1 = ensureNotNull(this.v11n_1.pax_1);
            var tmp_3 = this;
            tmp_3.a11o_1 = this.y11n_1;
            var tmp_4 = this;
            tmp_4.b11o_1 = this.a11o_1;
            var tmp_5 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.z11n_1);
            tmp_5.c11o_1 = this_0;
            this.c11o_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_6 = this;
            tmp_6.d11o_1 = this.b11o_1;
            var tmp_7 = this;
            tmp_7.e11o_1 = this.c11o_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.e11o_1, this.d11o_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            this.g11o_1 = suspendResult;
            var tmp_8 = this;
            var this_1 = this.x11n_1.t45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_8.h11o_1 = this.x11n_1.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.g11o_1);
            this.i11o_1 = requireBodyUrlForUri(this.h11o_1, ensureNotNull(this.v11n_1.nax_1));
            var tmp_9 = this;
            tmp_9.j11o_1 = this.u11n_1.m4r();
            var tmp_10 = this;
            tmp_10.k11o_1 = _get_httpClient__2ty1zc_6(this.u11n_1);
            var tmp_11 = this;
            tmp_11.l11o_1 = this.i11o_1;
            var tmp_12 = this;
            tmp_12.m11o_1 = this.k11o_1;
            var tmp_13 = this;
            tmp_13.n11o_1 = this.m11o_1;
            var tmp_14 = this;
            var this_3 = new HttpRequestBuilder();
            url(this_3, this.l11o_1);
            tmp_14.o11o_1 = this_3;
            this.o11o_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_15 = this;
            tmp_15.p11o_1 = this.n11o_1;
            var tmp_16 = this;
            tmp_16.q11o_1 = this.o11o_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.q11o_1, this.p11o_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 4:
            var string = suspendResult;
            var this_4 = this.j11o_1.t45();
            var this_5 = serializer(this_4, createKType(getKClass(MediaContentInfo), arrayOf([]), false));
            var mediaInfo = this.j11o_1.s45(isInterface(this_5, KSerializer) ? this_5 : THROW_CCE(), string);
            l$ret$1: do {
              var this_6 = this.u11n_1.t11p_1;
              while (true) {
                var prevValue = this_6.t2();
                var tmp0_contentEntryVersionUid = this.u11n_1.s11p_1;
                var tmp1_learningSpace = this.u11n_1.zqp().voc();
                var tmp2_manifestUrl = ensureNotNull(this.v11n_1.pax_1);
                var tmp3_contentManifestMap = new ContentManifestMap(this.h11o_1);
                var nextValue = prevValue.e11q(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.u11n_1, this.v11n_1, completion);
    i.w11n_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.n11q_1 = this$0;
    this.o11q_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.n11q_1.fqq().v7d().rau(this.o11q_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.n11q_1.t11p_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.e11q(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.n11q_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = contentEntry == null ? null : contentEntry.oav_1;
                var nextValue_0 = prevValue_0.vq8(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.n11q_1, this.o11q_1, completion);
    i.p11q_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.q11q_1 = timestamp;
    this.r11q_1 = timeInMillis;
    this.s11q_1 = totalDuration;
    this.t11q_1 = resumed;
  }
  protoOf(MediaPlayState).u11q = function () {
    var tmp;
    if (this.s11q_1.c7(new Long(0, 0)) > 0) {
      // Inline function 'kotlin.Long.times' call
      tmp = this.r11q_1.cb(toLong(100)).bb(this.s11q_1).mb();
    } else {
      tmp = 0;
    }
    return tmp;
  };
  protoOf(MediaPlayState).toString = function () {
    return 'MediaPlayState(timestamp=' + this.q11q_1.toString() + ', timeInMillis=' + this.r11q_1.toString() + ', totalDuration=' + this.s11q_1.toString() + ', resumed=' + this.t11q_1 + ')';
  };
  protoOf(MediaPlayState).hashCode = function () {
    var result = this.q11q_1.hashCode();
    result = imul(result, 31) + this.r11q_1.hashCode() | 0;
    result = imul(result, 31) + this.s11q_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.t11q_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.q11q_1.equals(tmp0_other_with_cast.q11q_1))
      return false;
    if (!this.r11q_1.equals(tmp0_other_with_cast.r11q_1))
      return false;
    if (!this.s11q_1.equals(tmp0_other_with_cast.s11q_1))
      return false;
    if (!(this.t11q_1 === tmp0_other_with_cast.t11q_1))
      return false;
    return true;
  };
  function _get_httpClient__2ty1zc_6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.v11p_1;
    httpClient$factory_14();
    return this_0.t2();
  }
  function Companion_207() {
    this.v11q_1 = 'Video';
  }
  var Companion_instance_256;
  function Companion_getInstance_224() {
    return Companion_instance_256;
  }
  function VideoContentViewModel$slambda(this$0, resultContinuation) {
    this.e11r_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.e11r_1.fqq().i7f().fbq(this.e11r_1.s11p_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.f11r_1, VOID, VOID, VideoContentViewModel$slambda$slambda_0(this.e11r_1, contentEntryVersion, null));
            launch(this.f11r_1, VOID, VOID, VideoContentViewModel$slambda$slambda_2(this.e11r_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.e11r_1, completion);
    i.f11r_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.r11p_1 = MutableStateFlow(new MediaPlayState());
    var tmp = this;
    Companion_getInstance_117();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.s11p_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.t11p_1 = MutableStateFlow(new VideoContentUiState());
    this.u11p_1 = asStateFlow(this.t11p_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.v11p_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.nqp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.videocontent.VideoContentViewModel.<anonymous>' call
        var nextValue = prevValue.vq8(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.aqq();
    launch(tmp_2, VOID, VOID, VideoContentViewModel$slambda_0(this, null));
  }
  protoOf(VideoContentViewModel).lyg = function () {
    var tmp0_safe_receiver = this.t11p_1.t2().c11q_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).g11r = function (playState) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.getAndUpdate' call
      var this_0 = this.r11p_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.t11q_1 === playState.t11q_1)) {
      this.bq5(playState.t11q_1);
    }
    this.oq5(playState.u11q());
  };
  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.w11p_1 = mediaContentInfo;
    this.x11p_1 = contentEntryVersionUid;
    this.y11p_1 = learningSpace;
    this.z11p_1 = mediaSrc;
    this.a11q_1 = manifestUrl;
    this.b11q_1 = contentManifestMap;
    this.c11q_1 = contentEntry;
    this.d11q_1 = isFullScreen;
  }
  protoOf(VideoContentUiState).h11r = function (mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen) {
    return new VideoContentUiState(mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen);
  };
  protoOf(VideoContentUiState).e11q = function (mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen, $super) {
    mediaContentInfo = mediaContentInfo === VOID ? this.w11p_1 : mediaContentInfo;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.x11p_1 : contentEntryVersionUid;
    learningSpace = learningSpace === VOID ? this.y11p_1 : learningSpace;
    mediaSrc = mediaSrc === VOID ? this.z11p_1 : mediaSrc;
    manifestUrl = manifestUrl === VOID ? this.a11q_1 : manifestUrl;
    contentManifestMap = contentManifestMap === VOID ? this.b11q_1 : contentManifestMap;
    contentEntry = contentEntry === VOID ? this.c11q_1 : contentEntry;
    isFullScreen = isFullScreen === VOID ? this.d11q_1 : isFullScreen;
    return $super === VOID ? this.h11r(mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen) : $super.h11r.call(this, mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen);
  };
  protoOf(VideoContentUiState).toString = function () {
    return 'VideoContentUiState(mediaContentInfo=' + this.w11p_1 + ', contentEntryVersionUid=' + this.x11p_1.toString() + ', learningSpace=' + this.y11p_1 + ', mediaSrc=' + this.z11p_1 + ', manifestUrl=' + this.a11q_1 + ', contentManifestMap=' + this.b11q_1 + ', contentEntry=' + this.c11q_1 + ', isFullScreen=' + this.d11q_1 + ')';
  };
  protoOf(VideoContentUiState).hashCode = function () {
    var result = this.w11p_1 == null ? 0 : hashCode(this.w11p_1);
    result = imul(result, 31) + this.x11p_1.hashCode() | 0;
    result = imul(result, 31) + (this.y11p_1 == null ? 0 : this.y11p_1.hashCode()) | 0;
    result = imul(result, 31) + (this.z11p_1 == null ? 0 : getStringHashCode(this.z11p_1)) | 0;
    result = imul(result, 31) + (this.a11q_1 == null ? 0 : getStringHashCode(this.a11q_1)) | 0;
    result = imul(result, 31) + (this.b11q_1 == null ? 0 : this.b11q_1.hashCode()) | 0;
    result = imul(result, 31) + (this.c11q_1 == null ? 0 : this.c11q_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.d11q_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.w11p_1, tmp0_other_with_cast.w11p_1))
      return false;
    if (!this.x11p_1.equals(tmp0_other_with_cast.x11p_1))
      return false;
    if (!equals(this.y11p_1, tmp0_other_with_cast.y11p_1))
      return false;
    if (!(this.z11p_1 == tmp0_other_with_cast.z11p_1))
      return false;
    if (!(this.a11q_1 == tmp0_other_with_cast.a11q_1))
      return false;
    if (!equals(this.b11q_1, tmp0_other_with_cast.b11q_1))
      return false;
    if (!equals(this.c11q_1, tmp0_other_with_cast.c11q_1))
      return false;
    if (!(this.d11q_1 === tmp0_other_with_cast.d11q_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.d11s_1;
    resolveXapiLaunchHrefUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_208() {
    this.h11s_1 = 'XapiContent';
  }
  var Companion_instance_257;
  function Companion_getInstance_225() {
    return Companion_instance_257;
  }
  function XapiContentViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.q11s_1 = this$0;
    this.r11s_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.q11s_1);
            Companion_getInstance_126();
            var tmp0_safe_receiver = this.r11s_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_126();
            var tmp2_safe_receiver = this.r11s_1.ba('courseBlockUid');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
            suspendResult = tmp_0.gpc(this.q11s_1.e11s_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.q11s_1.f11s_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.v11s(launchHrefResult.zp8_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.q11s_1.nqp_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.vq8(VOID, VOID, launchHrefResult.bp9_1.upb_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.q11s_1, this.r11s_1, completion);
    i.s11s_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.d11s_1 = Instance(this_0, tmp$ret$0, null).a5d(this, resolveXapiLaunchHrefUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_117();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_1.e11s_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.f11s_1 = MutableStateFlow(new XapiContentUiState(VOID, this.e11s_1));
    this.g11s_1 = asStateFlow(this.f11s_1);
    var tmp_2 = this.aqq();
    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.t11s_1 = url;
    this.u11s_1 = contentEntryVersionUid;
  }
  protoOf(XapiContentUiState).w11s = function (url, contentEntryVersionUid) {
    return new XapiContentUiState(url, contentEntryVersionUid);
  };
  protoOf(XapiContentUiState).v11s = function (url, contentEntryVersionUid, $super) {
    url = url === VOID ? this.t11s_1 : url;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.u11s_1 : contentEntryVersionUid;
    return $super === VOID ? this.w11s(url, contentEntryVersionUid) : $super.w11s.call(this, url, contentEntryVersionUid);
  };
  protoOf(XapiContentUiState).toString = function () {
    return 'XapiContentUiState(url=' + this.t11s_1 + ', contentEntryVersionUid=' + this.u11s_1.toString() + ')';
  };
  protoOf(XapiContentUiState).hashCode = function () {
    var result = this.t11s_1 == null ? 0 : getStringHashCode(this.t11s_1);
    result = imul(result, 31) + this.u11s_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.t11s_1 == tmp0_other_with_cast.t11s_1))
      return false;
    if (!this.u11s_1.equals(tmp0_other_with_cast.u11s_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$84(_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$86(_this__u8e3s4, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $encryptPbkdf2COROUTINE$84(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.f11t_1 = _this__u8e3s4;
    this.g11t_1 = password;
  }
  protoOf($encryptPbkdf2COROUTINE$84).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.f11t_1.onu_1).f58();
            var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
            tmp_0.h11t_1 = tmp_1.d58(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            tmp_3.i11t_1 = this.h11t_1;
            var tmp_4 = this;
            tmp_4.j11t_1 = this.f11t_1.nnu_1.xnv_1 + 'api/pbkdf2/encryptPbkdf2';
            var tmp_5 = this;
            tmp_5.k11t_1 = this.i11t_1;
            var tmp_6 = this;
            tmp_6.l11t_1 = this.k11t_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.j11t_1);
            parameter(this_0, 'secret', this.g11t_1);
            tmp_7.m11t_1 = this_0;
            this.m11t_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.n11t_1 = this.l11t_1;
            var tmp_9 = this;
            tmp_9.o11t_1 = this.m11t_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.o11t_1, this.n11t_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.p11t_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.p11t_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$86(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.y11t_1 = _this__u8e3s4;
    this.z11t_1 = password;
  }
  protoOf($doublePbkdf2HashAsBase64COROUTINE$86).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.y11t_1.onu_1).f58();
            var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
            tmp_0.a11u_1 = tmp_1.d58(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            tmp_3.b11u_1 = this.a11u_1;
            var tmp_4 = this;
            tmp_4.c11u_1 = this.y11t_1.nnu_1.xnv_1 + 'api/pbkdf2/doubleEncryptPbkdf2';
            var tmp_5 = this;
            tmp_5.d11u_1 = this.b11u_1;
            var tmp_6 = this;
            tmp_6.e11u_1 = this.d11u_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.c11u_1);
            parameter(this_0, 'secret', this.z11t_1);
            tmp_7.f11u_1 = this_0;
            this.f11u_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.g11u_1 = this.e11u_1;
            var tmp_9 = this;
            tmp_9.h11u_1 = this.f11u_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.h11u_1, this.g11u_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.i11u_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.i11u_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_117();
    if (_this__u8e3s4 === '') {
      tmp = get_ustadViewName(this$0.k11u_1);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function NavHostFunction(navigateFn, location, onHideChildren) {
    this.j11u_1 = navigateFn;
    this.k11u_1 = location;
    this.l11u_1 = onHideChildren;
  }
  protoOf(NavHostFunction).m11u = function (cmd) {
    if (cmd instanceof NavigateNavCommand) {
      var tmp1_safe_receiver = cmd.aqc_1.mq6_1;
      var popUpToView = tmp1_safe_receiver == null ? null : invoke$effectivePopUpTo(tmp1_safe_receiver, this);
      if ((popUpToView == null ? true : popUpToView === get_ustadViewName(this.k11u_1)) ? !cmd.aqc_1.oq6_1 ? true : this.k11u_1.key === get_firstLocationKey() : false) {
        Napier_getInstance().i5e('NavHostFunction: go to /' + cmd.yqb_1 + '?' + toUrlQueryString(cmd.zqb_1));
        var replaceNav = (popUpToView === get_ustadViewName(this.k11u_1) ? cmd.aqc_1.nq6_1 : false) ? true : cmd.aqc_1.oq6_1;
        var tmp = '/' + cmd.yqb_1 + '?' + toUrlQueryString(cmd.zqb_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.k11u_1);
        this.j11u_1(tmp, this_0);
      } else {
        Napier_getInstance().i5e('NavHostFunction: pop, then go /' + cmd.yqb_1 + '?' + toUrlQueryString(cmd.zqb_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.aqc_1.oq6_1.toString();
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerPopUpToInc'] = cmd.aqc_1.nq6_1.toString();
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerGoToAfterPop'] = '/' + cmd.yqb_1 + '?' + toUrlQueryString(cmd.zqb_1);
        this.l11u_1();
        this.j11u_1(-1);
      }
    } else {
      if (cmd instanceof PopNavCommand) {
        var popUpTo = invoke$effectivePopUpTo(cmd.cqc_1, this);
        if (popUpTo === get_ustadViewName(this.k11u_1) ? cmd.dqc_1 : false) {
          Napier_getInstance().i5e('NavHostFunction: pop to current viewname ' + popUpTo + ' (inclusive) ' + 'e.g. go back one');
          this.j11u_1(-1);
        } else if (!(popUpTo === get_ustadViewName(this.k11u_1))) {
          Napier_getInstance().i5e('NavHostFunction: pop to ' + popUpTo + ' inclusive = ' + cmd.dqc_1);
          sessionStorage.removeItem('navHostHitPopupto');
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpTo'] = cmd.cqc_1;
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpToInc'] = cmd.dqc_1.toString();
          this.l11u_1();
          this.j11u_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.v11u_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.v11u_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.v11u_1, completion);
    i.w11u_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$87(_this__u8e3s4, activeUserPersonUid, personUid, username, newPassword, currentPassword, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.f11v_1 = _this__u8e3s4;
    this.g11v_1 = activeUserPersonUid;
    this.h11v_1 = personUid;
    this.i11v_1 = username;
    this.j11v_1 = newPassword;
    this.k11v_1 = currentPassword;
  }
  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 = 3;
            var tmp_0 = this;
            var tmp_1 = this.f11v_1.u11v_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.l11v_1 = tmp_2;
            this.id_1 = 2;
            var tmp_3 = this;
            tmp_3.m11v_1 = this.f11v_1.v11v_1;
            var tmp_4 = this;
            tmp_4.n11v_1 = this.f11v_1.t11v_1.xnv_1 + 'api/account/setpassword';
            var tmp_5 = this;
            tmp_5.o11v_1 = this.m11v_1;
            var tmp_6 = this;
            tmp_6.p11v_1 = this.o11v_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.n11v_1);
            doorNodeIdHeader(this_0, this.l11v_1);
            parameter(this_0, 'nodeActiveUserUid', this.g11v_1);
            parameter(this_0, 'personUid', this.h11v_1.toString());
            parameter(this_0, 'username', this.i11v_1);
            parameter(this_0, 'newPassword', this.j11v_1);
            var tmp0_safe_receiver = this.k11v_1;
            if (tmp0_safe_receiver == null)
              null;
            else {
              parameter(this_0, 'currentPassword', tmp0_safe_receiver);
            }

            set_expectSuccess(this_0, false);
            tmp_7.q11v_1 = this_0;
            this.q11v_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_8 = this;
            tmp_8.r11v_1 = this.p11v_1;
            var tmp_9 = this;
            tmp_9.s11v_1 = this.q11v_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.s11v_1, this.r11v_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.t11v_1 = learningSpace;
    this.u11v_1 = repo;
    this.v11v_1 = httpClient;
  }
  protoOf(SetPasswordUseCaseJs).uok = function (activeUserPersonUid, personUid, username, newPassword, currentPassword, $completion) {
    var tmp = new $invokeCOROUTINE$87(this, activeUserPersonUid, personUid, username, newPassword, currentPassword, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OpenBlobUseCaseJs() {
  }
  protoOf(OpenBlobUseCaseJs).wor = function (item, onProgress, intent, $completion) {
    var element = document.createElement('a');
    element.setAttribute('href', item.eor_1);
    element.setAttribute('download', item.gor_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.e11w_1 = $transferJobItemStatusUpdater;
    this.f11w_1 = this$0;
    this.g11w_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).io1 = function (it, $completion) {
    var tmp = this.jo1(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.io1(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.e11w_1.coz(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.f11w_1.l11w_1.k7f();
            var tmp0_safe_receiver = firstOrNull(this.g11w_1);
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o11w_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zcb_1;
            suspendResult = tmp_0.dig(tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs, TransferJobItemStatus_FAILED_getInstance().vkc_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).jo1 = function (it, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda(this.e11w_1, this.f11w_1, this.g11w_1, completion);
    i.h11w_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.io1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$lambda($transferJobItemStatusUpdater, $uploadItem) {
    return function (it) {
      $transferJobItemStatusUpdater.zoy(new BlobTransferProgressUpdate($uploadItem, it.tpp_1));
      return Unit_instance;
    };
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda(this$0, $transferJobItemStatusUpdater, $uriToSaveQueueItems, resultContinuation) {
    this.x11w_1 = this$0;
    this.y11w_1 = $transferJobItemStatusUpdater;
    this.z11w_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.x11w_1.l11w_1, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda_0(this.y11w_1, this.x11w_1, this.z11w_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.x11w_1, this.y11w_1, this.z11w_1, completion);
    i.a11x_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.n11w_1 = uriToSaveItem;
    this.o11w_1 = transferJobItem;
  }
  protoOf(UriToSaveQueueItem).toString = function () {
    return 'UriToSaveQueueItem(uriToSaveItem=' + this.n11w_1 + ', transferJobItem=' + this.o11w_1 + ')';
  };
  protoOf(UriToSaveQueueItem).hashCode = function () {
    var result = this.n11w_1.hashCode();
    result = imul(result, 31) + this.o11w_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.n11w_1.equals(tmp0_other_with_cast.n11w_1))
      return false;
    if (!this.o11w_1.equals(tmp0_other_with_cast.o11w_1))
      return false;
    return true;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this$0, $localUrisToSave, $onTransferJobItemCreated, resultContinuation) {
    this.j11x_1 = this$0;
    this.k11x_1 = $localUrisToSave;
    this.l11x_1 = $onTransferJobItemCreated;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).e11y = function (it, $completion) {
    var tmp = this.jo1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.e11y(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.j11x_1.l11w_1.j7f().pid(new TransferJob(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.n11x_1 = suspendResult;
            this.o11x_1 = this.n11x_1.mb();
            var tmp_0 = this;
            tmp_0.p11x_1 = this.k11x_1;
            var tmp_1 = this;
            tmp_1.q11x_1 = this.p11x_1;
            var tmp_2 = this;
            tmp_2.r11x_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.p11x_1, 10));
            this.s11x_1 = this.q11x_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.s11x_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.t11x_1 = this.s11x_1.e();
            var tmp_3 = this;
            tmp_3.u11x_1 = this.t11x_1;
            var tmp_4 = this;
            tmp_4.v11x_1 = fetch(this.u11x_1.wot_1);
            this.hd_1 = 3;
            var this_0 = this.v11x_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.w11x_1 = suspendResult;
            this.x11x_1 = this.w11x_1.blob();
            this.hd_1 = 4;
            var this_1 = this.x11x_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.y11x_1 = suspendResult;
            this.z11x_1 = this.y11x_1.size;
            this.a11y_1 = numberToLong(this.z11x_1);
            var tmp_5 = this;
            var tmp0_tjiSrc = this.u11x_1.wot_1;
            var tmp1_tjiTableId = this.u11x_1.yot_1;
            var tmp2_tjiEntityUid = this.u11x_1.xot_1;
            tmp_5.b11y_1 = new TransferJobItem(VOID, this.o11x_1, this.a11y_1, VOID, VOID, tmp0_tjiSrc, VOID, VOID, VOID, tmp1_tjiTableId, tmp2_tjiEntityUid);
            this.hd_1 = 5;
            suspendResult = this.j11x_1.l11w_1.k7f().zif(this.b11y_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.c11y_1 = suspendResult;
            this.d11y_1 = this.c11y_1.mb();
            this.l11x_1(this.u11x_1, this.b11y_1.vkz(this.d11y_1));
            this.hd_1 = 6;
            suspendResult = this.j11x_1.m11w_1.roz(this.j11x_1.l11w_1, this.u11x_1.yot_1, this.u11x_1.xot_1, this.d11y_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            var ARGUMENT = new UriToSaveQueueItem(this.u11x_1, this.b11y_1.vkz(this.d11y_1));
            this.r11x_1.i1(ARGUMENT);
            this.hd_1 = 2;
            continue $sm;
          case 7:
            return this.r11x_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).jo1 = function (it, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this.j11x_1, this.k11x_1, this.l11x_1, completion);
    i.m11x_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.e11y(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1(this$0, $uriToSaveQueueItems, resultContinuation) {
    this.n11y_1 = this$0;
    this.o11y_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).k11z = 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.k11z((!(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.q11y_1 = new TransferJobItemStatusUpdater(this.n11y_1.l11w_1, null, this.p11y_1);
            this.id_1 = 5;
            var tmp_0 = this;
            tmp_0.s11y_1 = this.o11y_1;
            var tmp_1 = this;
            tmp_1.t11y_1 = this.s11y_1;
            var tmp_2 = this;
            tmp_2.u11y_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.s11y_1, 10));
            this.v11y_1 = this.t11y_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.v11y_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.w11y_1 = this.v11y_1.e();
            var tmp_3 = this;
            tmp_3.x11y_1 = this.w11y_1;
            this.y11y_1 = new BlobTransferJobItem('', this.x11y_1.o11w_1.ycb_1);
            this.q11y_1.aoz(new BlobTransferStatusUpdate(this.y11y_1, TransferJobItemStatus_IN_PROGRESS_getInstance().vkc_1));
            this.z11y_1 = this.n11y_1.i11w_1;
            this.a11z_1 = randomUuidAsString();
            this.b11z_1 = Companion_getInstance_3().o2r(this.x11y_1.n11w_1.wot_1);
            this.c11z_1 = this.n11y_1.j11w_1.xnv_1 + 'api/blob/upload-item';
            var tmp_4 = this;
            var this_0 = LinkedHashMap_init_$Create$();
            var tmp0_safe_receiver = this.x11y_1.n11w_1.zot_1;
            if (tmp0_safe_receiver == null)
              null;
            else {
              this_0.s('X-Blob-Response-' + 'Content-Type', listOf_0(tmp0_safe_receiver));
            }

            tmp_4.d11z_1 = asIStringValues(this_0.f3());
            this.hd_1 = 2;
            suspendResult = this.z11y_1.zpp(this.a11z_1, this.b11z_1, this.c11z_1, VOID, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$lambda(this.q11y_1, this.y11y_1), VOID, this.d11z_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.e11z_1 = suspendResult;
            var tmp_5 = this;
            var tmp5_elvis_lhs = this.e11z_1.vpp_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.f11z_1 = tmp_6;
            this.q11y_1.aoz(new BlobTransferStatusUpdate(this.y11y_1, TransferJobItemStatus_COMPLETE_getInstance().vkc_1));
            this.g11z_1 = this.n11y_1.k11w_1.s45(Companion_instance_83.n4r(), this.f11z_1);
            Napier_getInstance().i5e('SaveLocalUrisAsBlobUseCaseJs: upload complete: ' + (this.x11y_1.n11w_1.wot_1 + ' stored as ' + this.g11z_1.wos_1));
            this.h11z_1 = this.g11z_1.eou(this.x11y_1.n11w_1.xot_1, this.x11y_1.n11w_1.yot_1, this.x11y_1.n11w_1.wot_1);
            this.u11y_1.i1(this.h11z_1);
            this.hd_1 = 1;
            continue $sm;
          case 3:
            this.i11z_1 = this.u11y_1;
            this.hd_1 = 4;
            suspendResult = this.q11y_1.coz(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.r11y_1 = this.i11z_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.j11z_1 = this.kd_1;
              Napier_getInstance().q5e('SaveLocalUriAsBlobUseCaseJs: exception uploading', this.j11z_1);
              this.hd_1 = 6;
              var tmp_8 = NonCancellable_getInstance();
              suspendResult = withContext(tmp_8, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda_0(this.n11y_1, this.q11y_1, this.o11y_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.j11z_1;
          case 7:
            this.id_1 = 8;
            return this.r11y_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.n11y_1, this.o11y_1, completion);
    i.p11y_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.k11z($this$coroutineScope, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$88(_this__u8e3s4, localUrisToSave, onTransferJobItemCreated, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.t11z_1 = _this__u8e3s4;
    this.u11z_1 = localUrisToSave;
    this.v11z_1 = onTransferJobItemCreated;
  }
  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 = 3;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.t11z_1.l11w_1, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_0(this.t11z_1, this.u11z_1, this.v11z_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.w11z_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = coroutineScope(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_2(this.t11z_1, this.w11z_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.i11w_1 = chunkedUploadClientLocalUriUseCase;
    this.j11w_1 = learningSpace;
    this.k11w_1 = json;
    this.l11w_1 = db;
    this.m11w_1 = updateTransferJobItemEtagUseCase;
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs).fou = function (localUrisToSave, onTransferJobItemCreated, $completion) {
    var tmp = new $invokeCOROUTINE$88(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.f120_1 = this$0;
    this.g120_1 = $entityUid;
    this.h120_1 = $tableId;
    this.i120_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.f120_1.k120_1.gou(this.g120_1, this.h120_1, this.i120_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.f120_1, this.g120_1, this.h120_1, this.i120_1, completion);
    i.j120_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.k120_1 = savePictureUseCase;
    this.l120_1 = CoroutineScope_0(Dispatchers_getInstance().p12_1.lj(Job()));
  }
  protoOf(EnqueueSavePictureUseCaseJs).gou = function (entityUid, tableId, pictureUri, $completion) {
    launch(this.l120_1, VOID, VOID, EnqueueSavePictureUseCaseJs$invoke$slambda_0(this, entityUid, tableId, pictureUri, null));
    return Unit_instance;
  };
  function SetClipboardStringUseCaseJs() {
  }
  protoOf(SetClipboardStringUseCaseJs).bp4 = 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$89(_this__u8e3s4, fromUri, toUri, params, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.u120_1 = _this__u8e3s4;
    this.v120_1 = fromUri;
    this.w120_1 = toUri;
    this.x120_1 = params;
    this.y120_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 = 6;
            this.z120_1 = CompletableDeferred();
            Napier_getInstance().i5e('CompressImageUseCaseJs: compressing ' + this.v120_1);
            this.id_1 = 4;
            var tmp_0 = this;
            tmp_0.a121_1 = fetch(this.v120_1);
            this.hd_1 = 1;
            var this_0 = this.a121_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.b121_1 = suspendResult;
            this.c121_1 = this.b121_1.blob();
            this.hd_1 = 2;
            var this_1 = this.c121_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.d121_1 = suspendResult;
            var this_2 = {};
            this_2.maxWidth = this.x120_1.ep4_1;
            this_2.maxHeight = this.x120_1.fp4_1;
            this_2.convertSize = 50000;
            this_2.convertTypes = ['image/png'];
            this_2.success = CompressImageUseCaseJs$invoke$lambda(this.v120_1, this.z120_1);
            this_2.error = CompressImageUseCaseJs$invoke$lambda_0(this.v120_1, this.z120_1);
            new com_ustadmobile_core_wrappers_compressorjs_default_j4zdfk(this.d121_1, this_2);
            this.hd_1 = 3;
            suspendResult = this.z120_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.d121_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).e121 = function (fromUri, toUri, params, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$89(this, fromUri, toUri, params, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CompressImageUseCaseJs).hp4 = function (fromUri, toUri, params, onProgress, $completion) {
    return this.e121(fromUri, toUri, params, onProgress, $completion);
  };
  function Companion_209() {
    this.f121_1 = 3;
  }
  var Companion_instance_258;
  function Companion_getInstance_226() {
    return Companion_instance_258;
  }
  function ContentEntryGetMetaDataFromUriUseCaseJs$invoke$lambda($onProgress) {
    return function (it) {
      $onProgress(new ContentEntryGetMetadataStatus(false, VOID, it.tpp_1, it.upp_1));
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$90(_this__u8e3s4, contentUri, fileName, learningSpace, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.o121_1 = _this__u8e3s4;
    this.p121_1 = contentUri;
    this.q121_1 = fileName;
    this.r121_1 = learningSpace;
    this.s121_1 = onProgress;
  }
  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 = 9;
            this.t121_1 = randomUuid().toString();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 8;
            this.v121_1 = until(0, 3).w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.v121_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.w121_1 = this.v121_1.e();
            this.x121_1 = this.o121_1.b122_1;
            this.y121_1 = this.r121_1.xnv_1 + 'api/contentupload/upload';
            var tmp_0 = this;
            var this_0 = LinkedHashMap_init_$Create$();
            if (!(this.q121_1 == null)) {
              this_0.s('upload-original-filename', listOf_0(encodeURIComponent(this.q121_1)));
            }

            tmp_0.z121_1 = asIStringValues(this_0.f3());
            this.hd_1 = 4;
            var tmp_1 = new Long(0, 0);
            suspendResult = this.x121_1.zpp(this.t121_1, this.p121_1, this.y121_1, tmp_1, VOID, ContentEntryGetMetaDataFromUriUseCaseJs$invoke$lambda(this.s121_1), VOID, this.z121_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var finalResponse = suspendResult;
            var tmp4_subject = finalResponse.wpp_1;
            if (tmp4_subject === 400) {
              var tmp5_elvis_lhs = finalResponse.vpp_1;
              throw new InvalidContentException(tmp5_elvis_lhs == null ? '' : tmp5_elvis_lhs);
            } else if (tmp4_subject === 406) {
              var tmp6_elvis_lhs = finalResponse.vpp_1;
              throw new UnsupportedContentException(tmp6_elvis_lhs == null ? '' : tmp6_elvis_lhs);
            }

            var tmp_2 = this;
            var tmp7_safe_receiver = finalResponse.vpp_1;
            var tmp_3;
            if (tmp7_safe_receiver == null) {
              tmp_3 = null;
            } else {
              tmp_3 = this.o121_1.a122_1.s45(Companion_instance_82.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.u121_1 = tmp_4;
            this.id_1 = 9;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            var tmp_5 = this.u121_1;
            this.id_1 = 9;
            URL.revokeObjectURL(this.p121_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.p121_1.toString());
            return Unit_instance;
          case 8:
            this.id_1 = 9;
            var t = this.kd_1;
            URL.revokeObjectURL(this.p121_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.a122_1 = json;
    this.b122_1 = chunkedUploadClientLocalUriUseCase;
  }
  protoOf(ContentEntryGetMetaDataFromUriUseCaseJs).qp5 = function (contentUri, fileName, learningSpace, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$90(this, contentUri, fileName, learningSpace, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function $invokeCOROUTINE$91(_this__u8e3s4, subtitleTrackUri, filename, locale, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.k122_1 = _this__u8e3s4;
    this.l122_1 = subtitleTrackUri;
    this.m122_1 = filename;
    this.n122_1 = locale;
  }
  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 = 8;
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = fetch_0(toString(this.l122_1.q72_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.p122_1 = suspendResult;
            this.q122_1 = this.p122_1.blob();
            this.hd_1 = 2;
            var this_0 = this.q122_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.r122_1 = suspendResult;
            this.s122_1 = this.r122_1.text();
            this.hd_1 = 3;
            var this_1 = this.s122_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.o122_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.t122_1 = this.kd_1;
              var tmp_1 = this;
              Napier_getInstance().q5e('GetSubtitleTrackFromUriUseCaseJs: exception fetching local uri ' + this.l122_1, this.t122_1);
              throw IllegalStateException_init_$Create$_1('Failed to fetch blob for local uri ' + this.l122_1, this.t122_1);
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 8;
            this.u122_1 = this.o122_1;
            var tmp_2 = this;
            tmp_2.v122_1 = this.k122_1.e123_1;
            var tmp_3 = this;
            tmp_3.w122_1 = this.k122_1.d123_1.xnv_1 + 'api/contentupload/getsubtitletrack';
            var tmp_4 = this;
            tmp_4.x122_1 = this.v122_1;
            var tmp_5 = this;
            tmp_5.y122_1 = this.x122_1;
            var tmp_6 = this;
            var this_2 = new HttpRequestBuilder();
            url(this_2, this.w122_1);
            parameter(this_2, 'filename', this.m122_1);
            var tmp0_elvis_lhs = this.n122_1;
            parameter(this_2, 'locale', tmp0_elvis_lhs == null ? this.k122_1.g123_1.spo_1 : tmp0_elvis_lhs);
            var body = new TextContent(this.u122_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.z122_1 = this_2;
            this.z122_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_15 = this;
            tmp_15.a123_1 = this.y122_1;
            var tmp_16 = this;
            tmp_16.b123_1 = this.z122_1;
            this.hd_1 = 6;
            suspendResult = (new HttpStatement(this.b123_1, this.a123_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.c123_1 = suspendResult;
            this.hd_1 = 7;
            suspendResult = bodyAsText(this.c123_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            var subtitleJsonStr = suspendResult;
            return this.k122_1.f123_1.s45(Companion_instance_81.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.d123_1 = endpoint;
    this.e123_1 = httpClient;
    this.f123_1 = json;
    this.g123_1 = supportedLanguagesConfig;
  }
  protoOf(GetSubtitleTrackFromUriUseCaseJs).cp6 = function (subtitleTrackUri, filename, locale, $completion) {
    var tmp = new $invokeCOROUTINE$91(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.zp8_1;
    };
  }
  function LaunchXapiUseCaseJs$invoke$lambda_0($resolveResult) {
    return function () {
      return 'LaunchXapiUseCaseJs: navigating to: ' + $resolveResult.zp8_1;
    };
  }
  function $invokeCOROUTINE$92(_this__u8e3s4, contentEntryVersion, navController, clazzUid, cbUid, target, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.p123_1 = _this__u8e3s4;
    this.q123_1 = contentEntryVersion;
    this.r123_1 = navController;
    this.s123_1 = clazzUid;
    this.t123_1 = cbUid;
    this.u123_1 = target;
  }
  protoOf($invokeCOROUTINE$92).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.p123_1.v123_1.gpc(this.q123_1.lax_1, this.s123_1, this.t123_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var resolveResult = suspendResult;
            if (!this.u123_1.equals(LinkTarget_TOP_getInstance())) {
              var tmp_0 = Napier_getInstance();
              tmp_0.k5e(VOID, VOID, LaunchXapiUseCaseJs$invoke$lambda(resolveResult));
              window.open(resolveResult.zp8_1, asWindowTarget(this.u123_1), 'popup=true,noopener,noreferrer');
            } else {
              var tmp_1 = Napier_getInstance();
              tmp_1.k5e(VOID, VOID, LaunchXapiUseCaseJs$invoke$lambda_0(resolveResult));
              location.href = resolveResult.zp8_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.v123_1 = resolveXapiLaunchHrefUseCase;
  }
  protoOf(LaunchXapiUseCaseJs).vp8 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    var tmp = new $invokeCOROUTINE$92(this, contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LaunchXapiUseCaseJs).xp8 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    return this.vp8(contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
  };
  function SetLanguageUseCaseJs(languagesConfig) {
    this.w123_1 = languagesConfig;
  }
  protoOf(SetLanguageUseCaseJs).rpk = function (uiLang, currentDestination, navController, navArgs) {
    var currentDisplayLang = this.w123_1.spo_1;
    this.w123_1.aqa(uiLang.qq6_1);
    var newDisplayLang = this.w123_1.spo_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.x123_1 = di;
  }
  protoOf(GoToLearningSpaceUseCaseJs).tpk = function (url, navController, args, viewName) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var this_0 = this.x123_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).wpk(viewName, args);
    location.href = finalUrl;
  };
  function OpenExternalLinkUseCaseJs() {
  }
  protoOf(OpenExternalLinkUseCaseJs).epl = function (url, target) {
    window.open(url, asWindowTarget(target));
  };
  function BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda(this$0, $text, $accountPersonUid, $onProgress, resultContinuation) {
    this.g124_1 = this$0;
    this.h124_1 = $text;
    this.i124_1 = $accountPersonUid;
    this.j124_1 = $onProgress;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).h125 = 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.h125((!(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.l124_1 = this.g124_1.i125_1;
            var tmp_1 = this;
            tmp_1.m124_1 = this.g124_1.j125_1.xnv_1 + 'api/person/bulkadd/enqueue';
            var tmp_2 = this;
            tmp_2.n124_1 = this.l124_1;
            var tmp_3 = this;
            tmp_3.o124_1 = this.n124_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.m124_1);
            var body = new TextContent(this.h124_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.i124_1.toString());
            var tmp_13 = this.g124_1.l125_1;
            doorNodeAndVersionHeaders(this_0, isInterface(tmp_13, DoorDatabaseRepository) ? tmp_13 : THROW_CCE());
            tmp_4.p124_1 = this_0;
            this.p124_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_14 = this;
            tmp_14.q124_1 = this.o124_1;
            var tmp_15 = this;
            tmp_15.r124_1 = this.p124_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.r124_1, this.q124_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            this.t124_1 = suspendResult;
            this.u124_1 = toLong_0(this.t124_1);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!get_isActive(this.k124_1)) {
              this.hd_1 = 10;
              continue $sm;
            }

            this.id_1 = 7;
            var tmp_16 = this;
            tmp_16.v124_1 = this.g124_1.i125_1;
            var tmp_17 = this;
            tmp_17.w124_1 = this.g124_1.j125_1.xnv_1 + 'api/person/bulkadd/status';
            var tmp_18 = this;
            tmp_18.x124_1 = this.v124_1;
            var tmp_19 = this;
            tmp_19.y124_1 = this.x124_1;
            var tmp_20 = this;
            var this_1 = new HttpRequestBuilder();
            url(this_1, this.w124_1);
            parameter(this_1, 'timestamp', this.u124_1.toString());
            tmp_20.z124_1 = this_1;
            this.z124_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_21 = this;
            tmp_21.a125_1 = this.y124_1;
            var tmp_22 = this;
            tmp_22.b125_1 = this.z124_1;
            this.hd_1 = 4;
            suspendResult = (new HttpStatement(this.b125_1, this.a125_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.c125_1 = suspendResult;
            if (this.c125_1.j3b().f30_1 === 200) {
              var tmp_23 = this;
              tmp_23.d125_1 = this.g124_1.k125_1;
              this.hd_1 = 5;
              suspendResult = bodyAsText(this.c125_1, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 6;
              continue $sm;
            }

          case 5:
            this.e125_1 = suspendResult;
            var tmp_24 = this;
            var this_2 = this.d125_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(BulkAddPersonRunImportUiState), arrayOf([]), false));
            tmp_24.f125_1 = this.d125_1.s45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), this.e125_1);
            if (this.f125_1.vz3_1) {
              this.j124_1.ez4(this.f125_1.xz3_1, this.f125_1.wz3_1);
            } else {
              if (this.f125_1.mu8()) {
                throw new BulkAddPersonException(this.f125_1.zz3_1, this.f125_1.yz3_1);
              }
              return new BulkAddUsersResult(this.f125_1.xz3_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.g125_1 = this.kd_1;
              Napier_getInstance().m5e('BulkAddPersonFromLocalUriUseCaseJs exception', this.g125_1);
              var tmp_26 = this.g125_1;
              if (tmp_26 instanceof BulkAddPersonException)
                throw this.g125_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.g124_1, this.h124_1, this.i124_1, this.j124_1, completion);
    i.k124_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.h125($this$coroutineScope, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$93(_this__u8e3s4, uri, accountPersonUid, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.u125_1 = _this__u8e3s4;
    this.v125_1 = uri;
    this.w125_1 = accountPersonUid;
    this.x125_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$93).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.v125_1.toString(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.y125_1 = suspendResult;
            this.z125_1 = this.y125_1.text();
            this.hd_1 = 2;
            var this_0 = this.z125_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.a126_1 = suspendResult;
            console.log('csv text = ' + this.a126_1);
            this.hd_1 = 3;
            suspendResult = coroutineScope(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda_0(this.u125_1, this.a126_1, this.w125_1, this.x125_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.i125_1 = httpClient;
    this.j125_1 = learningSpace;
    this.k125_1 = json;
    this.l125_1 = repo;
  }
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs).upn = function (uri, accountPersonUid, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$93(this, uri, accountPersonUid, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OnClickPhoneNumUseCaseJs() {
  }
  protoOf(OnClickPhoneNumUseCaseJs).bp4 = 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).npj = 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.b126_1 = phoneNumber;
  }
  function PhoneNumberUtilJs() {
  }
  protoOf(PhoneNumberUtilJs).ypn = function (numberToParse, defaultRegion) {
    return new PhoneNumberJs(parsePhoneNumber(numberToParse, defaultRegion, null));
  };
  protoOf(PhoneNumberUtilJs).zpn = function (number) {
    return (number instanceof PhoneNumberJs ? number : THROW_CCE()).b126_1.formatInternational();
  };
  function OnClickSendEmailUseCaseJs() {
  }
  protoOf(OnClickSendEmailUseCaseJs).bp4 = 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.c126_1 = isTempFileCheckerUseCase;
  }
  protoOf(DeleteUrisUseCaseJs).iow = 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.c126_1.zpb(element)) {
        var tmp = Napier_getInstance();
        tmp.k5e(VOID, VOID, DeleteUrisUseCaseJs$invoke$lambda(element));
        URL.revokeObjectURL(element);
      }
    }
    return Unit_instance;
  };
  function IsTempFileCheckerUseCaseJs() {
  }
  protoOf(IsTempFileCheckerUseCaseJs).zpb = function (uri) {
    return startsWith(uri, 'blob:');
  };
  function ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda($logPrefix, $index, $chunkInfo) {
    return function () {
      return $logPrefix + ' : upload chunk #' + ($index + 1 | 0) + '/' + $chunkInfo.opp_1;
    };
  }
  function ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda_0($logPrefix, $index, $chunkInfo) {
    return function () {
      return $logPrefix + ' : upload chunk #' + ($index + 1 | 0) + '/' + $chunkInfo.opp_1 + ' complete ';
    };
  }
  function $invokeCOROUTINE$94(_this__u8e3s4, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.l126_1 = _this__u8e3s4;
    this.m126_1 = uploadUuid;
    this.n126_1 = localUri;
    this.o126_1 = remoteUrl;
    this.p126_1 = fromByte;
    this.q126_1 = chunkSize;
    this.r126_1 = onProgress;
    this.s126_1 = onStatusChange;
    this.t126_1 = lastChunkHeaders;
  }
  protoOf($invokeCOROUTINE$94).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 14;
            this.u126_1 = 'ChunkedUploadClientLocalUriUseCaseJs (' + this.m126_1 + ') : ' + this.n126_1 + ' -> ' + this.o126_1 + ':';
            this.id_1 = 13;
            Napier_getInstance().i5e(this.u126_1 + ' : starting');
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = fetch_0(toString(this.n126_1.q72_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.w126_1 = suspendResult;
            this.x126_1 = this.w126_1.blob();
            this.hd_1 = 2;
            var this_0 = this.x126_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.v126_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.y126_1 = this.kd_1;
              var tmp_1 = this;
              Napier_getInstance().q5e(this.u126_1 + ' exception fetching local uri ' + this.n126_1, this.y126_1);
              throw IllegalStateException_init_$Create$_1(this.u126_1 + ': failed to fetch blob for local uri ' + this.n126_1.q72_1, this.y126_1);
            } else {
              throw this.kd_1;
            }

          case 4:
            this.id_1 = 13;
            this.z126_1 = this.v126_1;
            this.a127_1 = this.z126_1.size;
            if (this.a127_1 <= 0.0)
              throw IllegalArgumentException_init_$Create$('Upload size <= 0');
            this.b127_1 = new ChunkInfo(numberToLong(this.a127_1), this.q126_1, this.p126_1);
            if (this.a127_1 >= IntCompanionObject_instance.MAX_VALUE)
              throw IllegalArgumentException_init_$Create$('JS: upload size(' + numberToLong(this.a127_1).toString() + ') > ' + IntCompanionObject_instance.MAX_VALUE + ' not supported');
            this.s126_1(TransferJobItemStatus_IN_PROGRESS_getInstance());
            var tmp_2 = this;
            tmp_2.c127_1 = this.b127_1;
            this.d127_1 = 0;
            this.e127_1 = this.c127_1.w();
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (!this.e127_1.f()) {
              this.hd_1 = 12;
              continue $sm;
            }

            this.f127_1 = this.e127_1.e();
            var tmp_3 = this;
            var tmp1 = this.d127_1;
            this.d127_1 = tmp1 + 1 | 0;
            tmp_3.g127_1 = checkIndexOverflow(tmp1);
            var tmp_4 = this;
            tmp_4.h127_1 = this.f127_1;
            var tmp_5 = Napier_getInstance();
            tmp_5.e5e(VOID, VOID, ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda(this.u126_1, this.g127_1, this.b127_1));
            this.i127_1 = this.z126_1.slice(this.h127_1.ppp_1.a7(), this.h127_1.qpp_1.a7());
            this.id_1 = 7;
            var tmp_6 = this;
            var this_1 = {};
            this_1.body = this.i127_1;
            this_1.method = 'POST';
            var this_2 = new Headers();
            this_2.set(get_HEADER_UPLOAD_UUID(), this.m126_1);
            this_2.set(get_HEADER_IS_FINAL_CHUNK(), this.h127_1.rpp_1.toString());
            this_2.set(get_HEADER_UPLOAD_START_BYTE(), this.h127_1.ppp_1.toString());
            if (this.h127_1.rpp_1 ? !(this.t126_1 == null) : false) {
              var tmp0_iterator = this.t126_1.o2n().w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp0_iterator_0 = this.t126_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.k127_1 = fetch(this.o126_1, this_1);
            this.hd_1 = 6;
            var this_3 = this.k127_1;
            suspendResult = await_0(this_3, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.j127_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.l127_1 = this.kd_1;
              var tmp_8 = this;
              Napier_getInstance().q5e(this.u126_1 + ' exception fetching response for blob upload ' + ('fromByte=' + this.b127_1.mpp_1.toString()), this.l127_1);
              throw IllegalStateException_init_$Create$_1(this.u126_1 + ' exception fetching response for blob upload ', this.l127_1);
            } else {
              throw this.kd_1;
            }

          case 8:
            this.id_1 = 13;
            this.m127_1 = this.j127_1;
            var tmp_9 = Napier_getInstance();
            tmp_9.e5e(VOID, VOID, ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda_0(this.u126_1, this.g127_1, this.b127_1));
            this.r126_1(new UploadProgress(this.h127_1.qpp_1, numberToLong(this.a127_1)));
            if (this.h127_1.rpp_1) {
              this.s126_1(TransferJobItemStatus_COMPLETE_getInstance());
              Napier_getInstance().i5e(this.u126_1 + ': Complete!');
              if (!(this.m127_1.status === 204)) {
                var tmp_10 = this;
                tmp_10.o127_1 = this.m127_1.text();
                this.hd_1 = 10;
                var this_4 = this.o127_1;
                suspendResult = await_0(this_4, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_11 = this;
                tmp_11.n127_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.n127_1 = suspendResult;
            this.hd_1 = 11;
            continue $sm;
          case 11:
            var ARGUMENT = this.n127_1;
            return new LastChunkResponse(ARGUMENT, this.m127_1.status, asIStringValues_0(this.m127_1.headers));
          case 12:
            throw IllegalStateException_init_$Create$(this.u126_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.u126_1 + ', ChunkedUploadClientLocalUriUseCaseJs: Exception', e);
              this.s126_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).ypp = function (uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion) {
    var tmp = new $invokeCOROUTINE$94(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.x127_1 = this$0;
    this.y127_1 = $statements;
    this.z127_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.x127_1.b128_1.fon(this.y127_1, this.z127_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.x127_1, this.y127_1, this.z127_1, completion);
    i.a128_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.b128_1 = xapiStatementResource;
  }
  protoOf(SaveStatementOnClearUseCaseJs).qq5 = function (statements, xapiSession) {
    var tmp = GlobalScope_instance;
    launch(tmp, VOID, VOID, SaveStatementOnClearUseCaseJs$invoke$slambda_0(this, statements, xapiSession, null));
  };
  function SaveStatementOnUnloadUseCaseJs(learningSpace, json) {
    this.c128_1 = learningSpace;
    this.d128_1 = json;
  }
  protoOf(SaveStatementOnUnloadUseCaseJs).qq5 = function (statements, xapiSession) {
    var tmp = navigator;
    var tmp_0 = this.c128_1.xnv_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.d128_1.r45(Companion_getInstance_95().n4r(), new XapiStatementsAndSession(statements, xapiSession));
    tmp.sendBeacon(tmp_0, tmp$ret$2);
  };
  function $invokeCOROUTINE$95(_this__u8e3s4, accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.m128_1 = _this__u8e3s4;
    this.n128_1 = accountPersonUid;
    this.o128_1 = actor;
    this.p128_1 = activityId;
    this.q128_1 = clazzUid;
    this.r128_1 = cbUid;
    this.s128_1 = contentEntryUid;
    this.t128_1 = contentEntryVersionUid;
  }
  protoOf($invokeCOROUTINE$95).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.u128_1 = this.m128_1.d129_1;
            var tmp_1 = this;
            tmp_1.v128_1 = this.m128_1.c129_1.xnv_1 + 'api/xapi-ext/resumeOrStartSession';
            var tmp_2 = this;
            tmp_2.w128_1 = this.u128_1;
            var tmp_3 = this;
            tmp_3.x128_1 = this.w128_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.v128_1);
            var tmp_5 = this.m128_1.e129_1;
            doorNodeIdHeader(this_0, isInterface(tmp_5, DoorDatabaseRepository) ? tmp_5 : THROW_CCE());
            parameter(this_0, 'accountPersonUid', this.n128_1.toString());
            parameter(this_0, 'actor', this.m128_1.f129_1.r45(Companion_instance_113.n4r(), this.o128_1));
            parameter(this_0, 'activityId', this.p128_1);
            parameter(this_0, 'clazzUid', this.q128_1.toString());
            parameter(this_0, 'cbUid', this.r128_1.toString());
            parameter(this_0, 'contentEntryUid', this.s128_1.toString());
            parameter(this_0, 'contentEntryVersionUid', this.t128_1.toString());
            tmp_4.y128_1 = this_0;
            this.y128_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_6 = this;
            tmp_6.z128_1 = this.x128_1;
            var tmp_7 = this;
            tmp_7.a129_1 = this.y128_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.a129_1, this.z128_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.b129_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_8 = this.b129_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.c129_1 = learningSpace;
    this.d129_1 = httpClient;
    this.e129_1 = repo;
    this.f129_1 = xapiJson.qpt_1;
  }
  protoOf(ResumeOrStartXapiSessionUseCaseJs).ypb = function (accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, $completion) {
    var tmp = new $invokeCOROUTINE$95(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.g129_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_42).t1d = function (value, $completion) {
    return this.g129_1(value, $completion);
  };
  function collectAsState$lambda$slambda$slambda($state, resultContinuation) {
    this.p129_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.p129_1[1](this.q129_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.p129_1, completion);
    i.q129_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.z129_1 = $this_collectAsState;
    this.a12a_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.a12a_1, null);
            suspendResult = this.z129_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.z129_1, this.a12a_1, completion);
    i.b12a_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.k12a_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.k12a_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.k12a_1, completion);
    i.l12a_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.m12a_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_43).t1d = function (value, $completion) {
    return this.m12a_1(value, $completion);
  };
  function useNavControllerEffect$slambda$slambda($navHostFn, resultContinuation) {
    this.v12a_1 = $navHostFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(useNavControllerEffect$slambda$slambda).x12a = function (it, $completion) {
    var tmp = this.y12a(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(useNavControllerEffect$slambda$slambda).he = function (p1, $completion) {
    return this.x12a(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.w12a_1);
          this.v12a_1.m11u(this.w12a_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).y12a = function (it, completion) {
    var i = new useNavControllerEffect$slambda$slambda(this.v12a_1, completion);
    i.w12a_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.x12a(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function useNavControllerEffect$slambda($commandFlow, $navHostFn, resultContinuation) {
    this.h12b_1 = $commandFlow;
    this.i12b_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.j12b_1 = this.h12b_1;
            if (this.j12b_1 == null) {
              this.k12b_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = useNavControllerEffect$slambda$slambda_0(this.i12b_1, null);
              suspendResult = this.j12b_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.k12b_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.h12b_1, this.i12b_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).l12b_1;
  }
  function ViewModelAndKey(viewModel, locationKey) {
    this.l12b_1 = viewModel;
    this.m12b_1 = locationKey;
  }
  protoOf(ViewModelAndKey).toString = function () {
    return 'ViewModelAndKey(viewModel=' + this.l12b_1 + ', locationKey=' + this.m12b_1 + ')';
  };
  protoOf(ViewModelAndKey).hashCode = function () {
    var result = hashCode(this.l12b_1);
    result = imul(result, 31) + getStringHashCode(this.m12b_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.l12b_1, tmp0_other_with_cast.l12b_1))
      return false;
    if (!(this.m12b_1 === tmp0_other_with_cast.m12b_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.l12b_1).f7());
      return this_0;
    };
  }
  function useViewModel$lambda$lambda($viewModelAndKey$delegate) {
    return function () {
      Napier_getInstance().i5e('Close ViewModel: ' + getKClassFromExpression(useViewModel$lambda($viewModelAndKey$delegate).l12b_1).f7());
      useViewModel$lambda($viewModelAndKey$delegate).l12b_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).m12b_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).l12b_1).f7());
        tmp = Unit_instance;
      }
      $this$useEffect.push(useViewModel$lambda$lambda($viewModelAndKey$delegate));
      return Unit_instance;
    };
  }
  function Companion_210() {
  }
  var Companion_instance_259;
  function Companion_getInstance_227() {
    return Companion_instance_259;
  }
  function UstadMobileSystemImpl(settings, langConfig, jsStringProvider) {
    UstadMobileSystemCommon.call(this, settings, langConfig);
    this.uol_1 = jsStringProvider;
  }
  protoOf(UstadMobileSystemImpl).vol = function (stringResource) {
    return stringResource.om9(this.uol_1, this.nq7_1.spo_1);
  };
  protoOf(UstadMobileSystemImpl).wol = function (stringResource, args) {
    return stringResource.pm9(this.uol_1, this.nq7_1.spo_1, args.slice());
  };
  protoOf(UstadMobileSystemImpl).awu = function (pluralsResource, number) {
    return format(pluralsResource, number, [number]).tm9(this.uol_1);
  };
  protoOf(UstadMobileSystemImpl).n12b = 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.n12b(context, zip, $completion);
  };
  protoOf(UstadMobileSystemImpl).o12b = 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.o12b(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).yk3_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).ak4();
    // 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).bk4();
    // 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).qpt_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).ak4();
    // 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).bk4();
    // 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.bk4());
  }
  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.bk4());
  }
  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.bk4());
  }
  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.yk3_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.ak4());
  }
  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).ak4();
    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.yk3_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).yk3_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.yk3_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().dnw_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().dnw_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().dnw_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().dnw_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().dnw_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().dnw_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().dnw_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().dnw_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().dnw_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().dnw_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().dnw_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().dnw_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().dnw_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().dnw_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().dnw_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.p12b_1 = locale;
    this.q12b_1 = jsStringProvider;
  }
  protoOf(StringProviderJs).xqa = function (stringResource) {
    return stringResource.om9(this.q12b_1, this.p12b_1);
  };
  protoOf(StringProviderJs).r12b = function (stringResource, args) {
    return stringResource.pm9(this.q12b_1, this.p12b_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_211() {
    this.s12b_1 = '_handleId';
  }
  var Companion_instance_260;
  function Companion_getInstance_228() {
    return Companion_instance_260;
  }
  function SavedStateHandle2(history, searchParams) {
    this.t12b_1 = history;
    this.u12b_1 = searchParams;
    var storedHandleId = this.ba('_handleId');
    if (storedHandleId == null) {
      this.v12b_1 = Default_getInstance_0().fg().toString();
      setStateKey(this.t12b_1, this, '_handleId', this.v12b_1);
    } else {
      this.v12b_1 = storedHandleId;
    }
  }
  protoOf(SavedStateHandle2).mql = function (key, value) {
    var tmp0_safe_receiver = this.t12b_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.v12b_1) {
      throw IllegalStateException_init_$Create$('SavedState cannot save values after the user has changed page');
    }
    if (!(value == null)) {
      setStateKey(this.t12b_1, this, key, value);
    }
  };
  protoOf(SavedStateHandle2).ba = function (key) {
    var tmp0_safe_receiver = this.t12b_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.u12b_1.get(key) : tmp3_elvis_lhs;
  };
  function UrlKmp(url) {
    return new UrlKmpJs(new URL(url));
  }
  function UrlKmpJs(url) {
    this.w12b_1 = url;
  }
  protoOf(UrlKmpJs).toString = function () {
    return toString(this.w12b_1);
  };
  protoOf(UrlKmpJs).sp4 = function (path) {
    return new UrlKmpJs(new URL(path, toString(this.w12b_1)));
  };
  function Companion_212() {
  }
  protoOf(Companion_212).gqf = function (text) {
    return encodeURIComponent(text);
  };
  protoOf(Companion_212).fqf = function (text) {
    return decodeURIComponent(text);
  };
  var Companion_instance_261;
  function Companion_getInstance_229() {
    return Companion_instance_261;
  }
  function UstadAntilog(defaultTag) {
    defaultTag = defaultTag === VOID ? 'NoTag' : defaultTag;
    Antilog.call(this);
    this.x12b_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.x12b_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.y12b_1 = headers;
  }
  protoOf(JsHeaderStringValuesAdapter).n2n = function (key) {
    var tmp0_safe_receiver = this.y12b_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.y12b_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($serializer_59).l4g = typeParametersSerializers;
  protoOf(CommandFlowUstadNavController).wp8 = navigate$default;
  protoOf(UstadViewModel).c57 = get_diContext;
  protoOf(UstadViewModel).d57 = get_diTrigger;
  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($serializer_66).l4g = typeParametersSerializers;
  protoOf(SaveLocalUrisAsBlobUseCaseJs).rot = invoke$default;
  protoOf(CompressImageUseCaseJs).dow = invoke$default_2;
  protoOf(GetSubtitleTrackFromUriUseCaseJs).dp6 = invoke$default_3;
  protoOf(SetLanguageUseCaseJs).spk = invoke$default_4;
  protoOf(ChunkedUploadClientLocalUriUseCaseJs).zpp = 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_52 = new Companion_3();
  Companion_instance_54 = new Companion_5();
  Companion_instance_55 = new Companion_6();
  Companion_instance_56 = new Companion_7();
  BodySerializer_instance = new BodySerializer();
  Companion_instance_57 = new Companion_8();
  Companion_instance_58 = new Companion_9();
  Companion_instance_59 = new Companion_10();
  Companion_instance_61 = new Companion_12();
  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_72 = new Companion_23();
  Companion_instance_74 = new Companion_25();
  Companion_instance_76 = new Companion_27();
  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_86 = new Companion_37();
  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_95 = new Companion_46();
  Companion_instance_97 = new Companion_48();
  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();
  Companion_instance_105 = new Companion_56();
  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_110 = new Companion_61();
  Companion_instance_113 = new Companion_64();
  Companion_instance_114 = new Companion_65();
  Companion_instance_116 = new Companion_67();
  XapiInteractionTypeSerializer_instance = new XapiInteractionTypeSerializer();
  XapiObjectTypeSerializer_instance = new XapiObjectTypeSerializer();
  Companion_instance_121 = new Companion_72();
  XAPI_RESULT_EXTENSION_PROGRESS = 'https://w3id.org/xapi/cmi5/result/extensions/progress';
  Companion_instance_124 = new Companion_75();
  Companion_instance_125 = new Companion_76();
  VERB_COMPLETED = 'http://adlnet.gov/expapi/verbs/completed';
  VERB_PROGRESSED = 'http://adlnet.gov/expapi/verbs/progressed';
  Companion_instance_131 = new Companion_82();
  Companion_instance_132 = new Companion_83();
  Companion_instance_133 = new Companion_84();
  Companion_instance_134 = new Companion_85();
  Companion_instance_136 = new Companion_87();
  Companion_instance_137 = new Companion_88();
  DiTag_instance = new DiTag();
  MS_PER_HOUR = 3600000;
  MS_PER_MIN = 60000;
  Companion_instance_139 = new Companion_90();
  UNSET_DISTANT_FUTURE = new Long(-289930240, 1689);
  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_147 = new Companion_98();
  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_155 = new Companion_106();
  Companion_instance_157 = new Companion_108();
  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_164 = new Companion_115();
  Companion_instance_166 = new Companion_117();
  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_172 = new Companion_123();
  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_180 = new Companion_131();
  Companion_instance_182 = new Companion_133();
  Companion_instance_183 = new Companion_134();
  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_192 = new Companion_143();
  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_201 = new Companion_152();
  Companion_instance_204 = new Companion_155();
  Companion_instance_205 = new Companion_156();
  Companion_instance_209 = new Companion_160();
  Companion_instance_210 = new Companion_161();
  Companion_instance_211 = new Companion_162();
  Companion_instance_212 = new Companion_163();
  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_222 = new Companion_173();
  Companion_instance_224 = new Companion_175();
  Companion_instance_225 = new Companion_176();
  Companion_instance_226 = new Companion_177();
  Companion_instance_227 = new Companion_178();
  PersonViewModelConstants_instance = new PersonViewModelConstants();
  Companion_instance_228 = new Companion_179();
  Companion_instance_229 = new Companion_180();
  Companion_instance_230 = new Companion_181();
  Companion_instance_232 = new Companion_183();
  Companion_instance_233 = new Companion_184();
  Companion_instance_234 = new Companion_185();
  Companion_instance_235 = new Companion_186();
  Companion_instance_237 = new Companion_188();
  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_245 = new Companion_196();
  Companion_instance_246 = new Companion_197();
  Companion_instance_248 = new Companion_199();
  Companion_instance_249 = new Companion_200();
  Companion_instance_250 = new Companion_201();
  Companion_instance_251 = new Companion_202();
  Companion_instance_253 = new Companion_204();
  Companion_instance_254 = new Companion_205();
  Companion_instance_255 = new Companion_206();
  Companion_instance_256 = new Companion_207();
  Companion_instance_257 = new Companion_208();
  NAVHOST_CLEARSTACK_VIEWNAME = 'ClearStack';
  Companion_instance_258 = new Companion_209();
  Companion_instance_259 = new Companion_210();
  Companion_instance_260 = new Companion_211();
  Companion_instance_261 = new Companion_212();
  //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 = CheckRegistrationAllowedUseCase;
  _.$_$.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;
  _.$_$.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 = ParentConsentWaitingScreenViewModel;
  _.$_$.p8 = ParentalConsentManagementUiState;
  _.$_$.q8 = ParentalConsentManagementViewModel;
  _.$_$.r8 = PdfContentUiState;
  _.$_$.s8 = PdfContentViewModel;
  _.$_$.t8 = PersonAccountEditUiState;
  _.$_$.u8 = PersonAccountEditViewModel;
  _.$_$.v8 = PersonUsernameAndPasswordModel;
  _.$_$.w8 = BulkAddPersonRunImportUiState;
  _.$_$.x8 = BulkAddPersonRunImportViewModel;
  _.$_$.y8 = BulkAddPersonSelectFileUiState;
  _.$_$.z8 = BulkAddPersonSelectFileViewModel;
  _.$_$.a9 = ChildProfileListUiState;
  _.$_$.b9 = ChildProfileListViewModel;
  _.$_$.c9 = EditChildProfileUiState;
  _.$_$.d9 = EditChildProfileViewModel;
  _.$_$.e9 = PersonDetailUiState;
  _.$_$.f9 = PersonDetailViewModel;
  _.$_$.g9 = PersonEditUiState;
  _.$_$.h9 = PersonEditViewModel;
  _.$_$.i9 = LearningSpaceListUiState;
  _.$_$.j9 = LearningSpaceListViewModel;
  _.$_$.k9 = PersonListUiState;
  _.$_$.l9 = PersonListViewModel;
  _.$_$.m9 = ManageAccountUiState;
  _.$_$.n9 = ManageAccountViewModel;
  _.$_$.o9 = RegisterAgeRedirectUiState;
  _.$_$.p9 = RegisterAgeRedirectViewModel;
  _.$_$.q9 = RegisterMinorWaitForParentUiState;
  _.$_$.r9 = RegisterMinorWaitForParentViewModel;
  _.$_$.s9 = RedirectViewModel;
  _.$_$.t9 = ScheduleEditUiState;
  _.$_$.u9 = ScheduleEditViewModel;
  _.$_$.v9 = SettingsUiState;
  _.$_$.w9 = SettingsViewModel;
  _.$_$.x9 = SignUpUiState;
  _.$_$.y9 = SignUpViewModel;
  _.$_$.z9 = SignupEnterUsernamePasswordUiState;
  _.$_$.aa = SignupEnterUsernamePasswordViewModel;
  _.$_$.ba = SiteDetailUiState;
  _.$_$.ca = SiteDetailViewModel;
  _.$_$.da = SiteEditUiState;
  _.$_$.ea = SiteEditViewModel;
  _.$_$.fa = SiteTermsDetailUiState;
  _.$_$.ga = SiteTermsDetailViewModel;
  _.$_$.ha = LearningSpaceEnterLinkUiState;
  _.$_$.ia = LearningSpaceEnterLinkViewModel;
  _.$_$.ja = SystemPermissionDetailUiState;
  _.$_$.ka = SystemPermissionDetailViewModel;
  _.$_$.la = SystemPermissionEditUiState;
  _.$_$.ma = SystemPermissionEditViewModel;
  _.$_$.na = TimeZoneListViewModel;
  _.$_$.oa = TimezoneListUiState;
  _.$_$.pa = VideoContentUiState;
  _.$_$.qa = MediaPlayState;
  _.$_$.ra = VideoContentViewModel;
  _.$_$.sa = XapiContentUiState;
  _.$_$.ta = XapiContentViewModel;
  _.$_$.ua = ErrorReportUiState;
  _.$_$.va = HolidayCalendarDetailUIState;
  _.$_$.wa = HolidayCalendarEditUiState;
  _.$_$.xa = HolidayCalendarListUiState;
  _.$_$.ya = LanguageDetailUiState;
  _.$_$.za = LanguageEditUiState;
  _.$_$.ab = LanguageListUiState;
  _.$_$.bb = LeavingReasonEditUiState;
  _.$_$.cb = LeavingReasonEditViewModel;
  _.$_$.db = ReportFilterEditUiState;
  _.$_$.eb = ScopedGrantDetailUiState;
  _.$_$.fb = ScopedGrantEditUiState;
  _.$_$.gb = CompressionLevel_MEDIUM_getInstance;
  _.$_$.hb = LinkTarget_DEFAULT_getInstance;
  _.$_$.ib = AppBarColors_SELECTION_MODE_getInstance;
  _.$_$.jb = AppBarColors_STANDARD_getInstance;
  _.$_$.kb = FabIcon_ADD_getInstance;
  _.$_$.lb = FabIcon_EDIT_getInstance;
  _.$_$.mb = State_INDETERMINATE_getInstance;
  _.$_$.nb = MarkingType_PEERS_getInstance;
  _.$_$.ob = TextLimitType_LIMIT_WORDS_getInstance;
  _.$_$.pb = SupportedLanguagesConfig_init_$Create$;
  _.$_$.qb = _AssignmentSubmitterSummaryUiState___get_fileSubmissionStatusIconVisible__impl__so25h0;
  _.$_$.rb = _AssignmentSubmitterSummaryUiState___get_latestPrivateCommentVisible__impl__bdq0p0;
  _.$_$.sb = _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2;
  _.$_$.tb = _ContentEntryListItemUiState___get_descriptionVisible__impl__xyu083;
  _.$_$.ub = _ContentEntryListItemUiState___get_mimetypeVisible__impl__l8r8g7;
  _.$_$.vb = Companion_getInstance_17;
  _.$_$.wb = PersonConstants_getInstance;
  _.$_$.xb = SubmissionConstants_getInstance;
  _.$_$.yb = Companion_getInstance_55;
  _.$_$.zb = Companion_instance_99;
  _.$_$.ac = Companion_instance_103;
  _.$_$.bc = Companion_getInstance_74;
  _.$_$.cc = Companion_instance_131;
  _.$_$.dc = Companion_instance_132;
  _.$_$.ec = Companion_instance_133;
  _.$_$.fc = Companion_instance_134;
  _.$_$.gc = ClazzEnrolmentListConstants_getInstance;
  _.$_$.hc = ConditionConstants_getInstance;
  _.$_$.ic = ContentCompletionStatusConstants_getInstance;
  _.$_$.jc = EnrolmentPolicyConstants_getInstance;
  _.$_$.kc = FieldConstants_getInstance;
  _.$_$.lc = LicenceConstants_getInstance;
  _.$_$.mc = OutcomeConstants_getInstance;
  _.$_$.nc = PersonParentJoinConstants_getInstance;
  _.$_$.oc = RoleConstants_getInstance;
  _.$_$.pc = ScheduleConstants_getInstance;
  _.$_$.qc = SubmissionPolicyConstants_getInstance;
  _.$_$.rc = UstadMobileConstants_getInstance;
  _.$_$.sc = Companion_getInstance_97;
  _.$_$.tc = DiTag_instance;
  _.$_$.uc = Companion_getInstance_106;
  _.$_$.vc = UMFileUtil_getInstance;
  _.$_$.wc = Companion_instance_139;
  _.$_$.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_147;
  _.$_$.ed = Companion_instance_159;
  _.$_$.fd = Companion_instance_160;
  _.$_$.gd = Companion_instance_161;
  _.$_$.hd = Companion_instance_162;
  _.$_$.id = Companion_instance_163;
  _.$_$.jd = Companion_instance_164;
  _.$_$.kd = Companion_instance_166;
  _.$_$.ld = Companion_instance_168;
  _.$_$.md = Companion_instance_169;
  _.$_$.nd = Companion_instance_170;
  _.$_$.od = Companion_instance_171;
  _.$_$.pd = Companion_instance_172;
  _.$_$.qd = Companion_getInstance_142;
  _.$_$.rd = Companion_getInstance_141;
  _.$_$.sd = Companion_instance_175;
  _.$_$.td = Companion_instance_176;
  _.$_$.ud = Companion_instance_177;
  _.$_$.vd = Companion_instance_180;
  _.$_$.wd = Companion_instance_179;
  _.$_$.xd = Companion_instance_182;
  _.$_$.yd = Companion_instance_183;
  _.$_$.zd = Companion_instance_185;
  _.$_$.ae = Companion_instance_186;
  _.$_$.be = Companion_instance_178;
  _.$_$.ce = ClazzAssignmentViewModelConstants_getInstance;
  _.$_$.de = Companion_instance_187;
  _.$_$.ee = Companion_instance_188;
  _.$_$.fe = Companion_instance_189;
  _.$_$.ge = Companion_instance_190;
  _.$_$.he = Companion_instance_191;
  _.$_$.ie = Companion_instance_192;
  _.$_$.je = Companion_getInstance_161;
  _.$_$.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_instance_201;
  _.$_$.se = Companion_getInstance_170;
  _.$_$.te = Companion_instance_205;
  _.$_$.ue = Companion_getInstance_175;
  _.$_$.ve = Companion_instance_209;
  _.$_$.we = Companion_getInstance_174;
  _.$_$.xe = Companion_instance_210;
  _.$_$.ye = Companion_instance_211;
  _.$_$.ze = Companion_instance_212;
  _.$_$.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_220;
  _.$_$.hf = Companion_instance_222;
  _.$_$.if = Companion_getInstance_191;
  _.$_$.jf = Companion_instance_224;
  _.$_$.kf = Companion_instance_225;
  _.$_$.lf = Companion_instance_226;
  _.$_$.mf = Companion_instance_227;
  _.$_$.nf = Companion_instance_228;
  _.$_$.of = Companion_instance_230;
  _.$_$.pf = Companion_instance_232;
  _.$_$.qf = Companion_instance_233;
  _.$_$.rf = Companion_instance_234;
  _.$_$.sf = Companion_instance_235;
  _.$_$.tf = Companion_getInstance_204;
  _.$_$.uf = Companion_instance_237;
  _.$_$.vf = Companion_getInstance_206;
  _.$_$.wf = Companion_instance_239;
  _.$_$.xf = Companion_instance_240;
  _.$_$.yf = Companion_instance_241;
  _.$_$.zf = Companion_instance_243;
  _.$_$.ag = Companion_instance_245;
  _.$_$.bg = Companion_getInstance_215;
  _.$_$.cg = Companion_instance_248;
  _.$_$.dg = Companion_instance_249;
  _.$_$.eg = Companion_instance_250;
  _.$_$.fg = Companion_instance_251;
  _.$_$.gg = Companion_getInstance_220;
  _.$_$.hg = Companion_instance_253;
  _.$_$.ig = Companion_instance_254;
  _.$_$.jg = Companion_instance_255;
  _.$_$.kg = Companion_instance_256;
  _.$_$.lg = Companion_instance_257;
  _.$_$.mg = Companion_instance_150;
  _.$_$.ng = Companion_instance_151;
  _.$_$.og = Companion_instance_152;
  _.$_$.pg = Companion_instance_153;
  _.$_$.qg = Companion_instance_154;
  _.$_$.rg = Companion_instance_155;
  _.$_$.sg = Companion_getInstance_126;
  _.$_$.tg = strings_getInstance;
  _.$_$.ug = 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('./ktor-ktor-client-core.js'), require('./ktor-ktor-http.js'), require('./door-door-runtime.js'), require('./Napier-napier-js-ir.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./kotlinx-coroutines-core.js'), require('./kotlinx-serialization-kotlinx-serialization-json.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
